Fix auto-scroll issue around first message in thread.

This commit is contained in:
Matthew Chen 2020-12-17 16:06:20 -03:00
parent e82165466b
commit 0d88303e1f

View File

@ -478,8 +478,12 @@ extension ConversationViewController: CVLoadCoordinatorDelegate {
case .insert(let renderItem, _):
var wasJustInserted = false
if let lastMessageForInboxSortId = updateToken.lastMessageForInboxSortId,
lastMessageForInboxSortId < renderItem.interaction.sortId {
if let lastMessageForInboxSortId = updateToken.lastMessageForInboxSortId {
if lastMessageForInboxSortId < renderItem.interaction.sortId {
wasJustInserted = true
}
} else {
// The first interaction in the thread.
wasJustInserted = true
}