Fix slight scroll behavior issue

pull/429/head
nielsandriesse 3 years ago
parent 56c2482b8e
commit 0b5e13ca59

@ -334,7 +334,11 @@ 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 = (self.lastPageTop - self.messagesTableView.contentOffset.y) <= 0
if update.viewItem?.interaction is TSOutgoingMessage {
shouldScrollToBottom = true
} else {
shouldScrollToBottom = (self.lastPageTop - self.messagesTableView.contentOffset.y) <= 0
}
case .update:
self.messagesTableView.reloadRows(at: [ IndexPath(row: Int(update.oldIndex), section: 0) ], with: .fade)
shouldScrollToBottom = (self.lastPageTop - self.messagesTableView.contentOffset.y) <= 0

Loading…
Cancel
Save