fix scroll to bottom crash

pull/541/head
Ryan Zhao 3 years ago
parent 629d952944
commit 27e7c25197

@ -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)
}

Loading…
Cancel
Save