From b2536173a0894041f7f81750952fab756d38cd94 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Thu, 3 Jun 2021 14:38:50 +1000 Subject: [PATCH] fix conversations never scroll down when a new message comes in --- Session/Conversations/ConversationVC.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Session/Conversations/ConversationVC.swift b/Session/Conversations/ConversationVC.swift index f0aeb67fc..0cd306316 100644 --- a/Session/Conversations/ConversationVC.swift +++ b/Session/Conversations/ConversationVC.swift @@ -334,12 +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) - let viewItem = update.viewItem - if viewItem?.interaction is TSOutgoingMessage { - shouldScrollToBottom = true - } + shouldScrollToBottom = true case .update: self.messagesTableView.reloadRows(at: [ IndexPath(row: Int(update.oldIndex), section: 0) ], with: .fade) + shouldScrollToBottom = true default: preconditionFailure() } }