Fix scroll position jumping when replying or resizing the window

pull/1542/merge
Nicolas Werner 1 year ago
parent d45dc6c77b
commit e3ad60911d
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 7
      resources/qml/MessageView.qml

@ -59,6 +59,13 @@ Item {
spacing: 2
verticalLayoutDirection: ListView.BottomToTop
property int lastScrollPos: 0
// Fixup the scroll position when the height changes. Without this, the view is kept around the center of the currently visible content, while we usually want to stick to the bottom.
onMovementEnded: lastScrollPos = (contentY+height)
onModelChanged: lastScrollPos = (contentY+height)
onHeightChanged: contentY = (lastScrollPos-height)
Component {
id: defaultMessageStyle

Loading…
Cancel
Save