Re-settle the timeline view when replying to messages

Or changing the height of the chatbar in other ways, which I'm sure is
going to become more common with our new rich text system.

(cherry picked from commit e4c9230c09)
This commit is contained in:
Joshua Goins
2026-02-12 20:54:53 -05:00
parent c439fa7e45
commit 76180ace07

View File

@@ -80,6 +80,12 @@ Kirigami.Page {
onHeightChanged: {
// HACK: See TimelineView for the hack details.
// We get the height change here *first* so we are informed this is because of a window resize and not due to the pinned message.
resetViewSettling();
}
// Resets the view settling of the timeline.
// This should be called whenever the apparent height of the timeline changes, or else the view will scroll on its own!
function resetViewSettling(): void {
(timelineViewLoader.item as TimelineView).resetViewSettling();
}
@@ -305,6 +311,9 @@ Kirigami.Page {
width: parent.width
currentRoom: root.currentRoom
connection: root.currentRoom.connection as NeoChatConnection
// Creating a reply (or doing anything in the chat bar) can change the height, but this isn't picked up on the root's onHeightChanged.
onHeightChanged: root.resetViewSettling()
}
}