Mark thread as read when viewed

This commit is contained in:
ismailgulek
2021-12-02 16:57:41 +03:00
parent 107bb8f13c
commit c48c3a8fe7
2 changed files with 8 additions and 1 deletions
@@ -39,6 +39,13 @@ class ThreadViewController: RoomViewController {
return UINib(nibName: String(describing: RoomViewController.self), bundle: .main)
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
guard let threadId = threadId else { return }
mainSession.threadingService.markThreadAsRead(threadId)
}
override func setRoomTitleViewClass(_ roomTitleViewClass: AnyClass!) {
super.setRoomTitleViewClass(ThreadRoomTitleView.self)