From 27e7c25197d6372298b4a1caaf660660fdcb0425 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 28 Feb 2022 16:35:28 +1100 Subject: [PATCH] fix scroll to bottom crash --- Session/Conversations/ConversationVC.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Session/Conversations/ConversationVC.swift b/Session/Conversations/ConversationVC.swift index bff3d309a..c2868ff06 100644 --- a/Session/Conversations/ConversationVC.swift +++ b/Session/Conversations/ConversationVC.swift @@ -728,7 +728,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat } func scrollToBottom(isAnimated: Bool) { - guard !isUserScrolling else { return } + guard !isUserScrolling && !viewItems.isEmpty else { return } messagesTableView.scrollToRow(at: IndexPath(row: viewItems.count - 1, section: 0), at: .top, animated: isAnimated) }