Add hack around the timeline never settling just right
This is due to some kind of bug in ListView that never resettles properly for bottom-to-top views. This can arise when the pinned message is loaded (because that squishes the view) or the window is resized (because that also resizes the view.) We can work around it by assuming the following: 1. The RoomPage knows the window is resizing because it gets its height changed before TimelineView. 2. The first height change can be a marker to position the view at the beginning. This fixes the issue for me, I did the following in order to test this: * Switch between many rooms, especially ones with a pinned message. Now all of them start at the bottom as they should. * Resize the window, ensure that if you scrolled it stays around that position - otherwise it sticks at the bottom.
This commit is contained in:
@@ -75,6 +75,12 @@ Kirigami.Page {
|
||||
focus: true
|
||||
padding: 0
|
||||
|
||||
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.
|
||||
(timelineViewLoader.item as TimelineView).resetViewSettling();
|
||||
}
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
id: jitsiMeetingAction
|
||||
|
||||
Reference in New Issue
Block a user