fix scroll to button not always works
This commit is contained in:
parent
d2161545d6
commit
221eabc496
|
@ -18,7 +18,10 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc
|
|||
}
|
||||
|
||||
func handleScrollToBottomButtonTapped() {
|
||||
scrollToBottom(isAnimated: true)
|
||||
// The tableview's content size will be calculated by the estimated height of cells,
|
||||
// so the result may be inaccurate before all the cells are loaded.
|
||||
// Use this scroll to the last row instead.
|
||||
messagesTableView.scrollToRow(at: IndexPath(row: viewItems.count-1, section: 0), at: .top, animated: true)
|
||||
}
|
||||
|
||||
// MARK: Blocking
|
||||
|
|
Loading…
Reference in New Issue