fix unread count not disappear after scrolling to bottom

This commit is contained in:
ryanzhao 2021-07-27 14:45:23 +10:00
parent 42ab5001bc
commit 25b9b06044
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc
// so the result may be inaccurate before all the cells are loaded. Use this
// to scroll to the last row instead.
let indexPath = IndexPath(row: viewItems.count - 1, section: 0)
unreadViewItems.removeAll()
messagesTableView.scrollToRow(at: indexPath, at: .top, animated: true)
}