fix scroll: defer positionViewAtEnd to after layout
This commit is contained in:
parent
2bd7a2dca0
commit
2d2ba1eeaf
|
|
@ -307,16 +307,14 @@ ApplicationWindow {
|
|||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
onCountChanged: {
|
||||
if (count > 0) {
|
||||
positionViewAtEnd()
|
||||
}
|
||||
Qt.callLater(function() { positionViewAtEnd() })
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: chatModel
|
||||
function onDataChanged() {
|
||||
if (chatView.atYEnd)
|
||||
chatView.positionViewAtEnd()
|
||||
Qt.callLater(function() { chatView.positionViewAtEnd() })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue