From 0475274b4d75713fb9121751bbdda6f7da3016ff Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Thu, 3 Jun 2021 15:16:17 +1000 Subject: [PATCH] only scroll down when we are already at the bottom --- Session/Conversations/ConversationVC.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Session/Conversations/ConversationVC.swift b/Session/Conversations/ConversationVC.swift index 0cd306316..134e4a3cf 100644 --- a/Session/Conversations/ConversationVC.swift +++ b/Session/Conversations/ConversationVC.swift @@ -334,10 +334,10 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat case .insert: // Perform inserts before updates self.messagesTableView.insertRows(at: [ IndexPath(row: Int(update.newIndex), section: 0) ], with: .fade) - shouldScrollToBottom = true + shouldScrollToBottom = (self.scrollButton.alpha == 0) case .update: self.messagesTableView.reloadRows(at: [ IndexPath(row: Int(update.oldIndex), section: 0) ], with: .fade) - shouldScrollToBottom = true + shouldScrollToBottom = (self.scrollButton.alpha == 0) default: preconditionFailure() } }