Disable auto-scroll when app is in background, fixes 410

This commit is contained in:
Sebastian Wolf 2021-05-25 22:48:25 +02:00
parent 29719c0764
commit 388ea83e45
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A

View file

@ -592,7 +592,7 @@ Page {
chatViewStartupReadTimer.restart();
}
onNewMessageReceived: {
if (chatView.manuallyScrolledToBottom || message.sender.user_id === chatPage.myUserId) {
if (( chatView.manuallyScrolledToBottom && Qt.application.state === Qt.ApplicationActive ) || message.sender.user_id === chatPage.myUserId) {
Debug.log("[ChatPage] Own message received or was scrolled to bottom, scrolling down to see it...");
chatView.scrollToIndex(chatView.count - 1);
viewMessageTimer.queueViewMessage(chatView.count - 1);