Add ability mark as unread / mark as read a room.

This commit is contained in:
Benoit Marty 2024-02-06 12:21:45 +01:00 committed by Benoit Marty
parent d06e5c23cb
commit 9d461a4917
21 changed files with 229 additions and 13 deletions

View file

@ -155,6 +155,14 @@ class MessagesPresenter @AssistedInject constructor(
mutableStateOf(false)
}
LaunchedEffect(Unit) {
// Mark the room as read on entering but don't send read receipts
// as those will be handled by the timeline.
withContext(dispatchers.io) {
room.markAsRead(null)
}
}
LaunchedEffect(syncUpdateFlow.value) {
withContext(dispatchers.io) {
canJoinCall = room.canUserJoinCall(room.sessionId).getOrDefault(false)