Skip to content

Commit

Permalink
Disable auto-scroll when app is in background, fixes 410
Browse files Browse the repository at this point in the history
  • Loading branch information
Wunderfitz committed May 25, 2021
1 parent 29719c0 commit 388ea83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qml/pages/ChatPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 388ea83

Please sign in to comment.