diff --git a/gui/main.qml b/gui/main.qml index b865d7e..8319d04 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -888,14 +888,23 @@ ApplicationWindow { onCountChanged: { if (followTail) - Qt.callLater(chatView.scrollToEnd) + scrollTimer.restart() + } + + onContentHeightChanged: { + if (followTail) + scrollTimer.restart() } onMovementEnded: followTail = atYEnd - function scrollToEnd() { - if (followTail && contentHeight > height) - positionViewAtEnd() + Timer { + id: scrollTimer + interval: 16 + onTriggered: { + if (chatView.followTail && chatView.contentHeight > chatView.height) + chatView.positionViewAtEnd() + } } delegate: ChatBlockDelegate {