Fix removing unread marker automatically when opening chats at unread
Change-Id: I0ff265fb72df4f6d21e4048d0e6667be882d5882
This commit is contained in:
parent
daad03bc89
commit
c6c38a4d75
|
@ -189,9 +189,11 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||||
observeActiveRoomWidgets()
|
observeActiveRoomWidgets()
|
||||||
observePowerLevel()
|
observePowerLevel()
|
||||||
room.getRoomSummaryLive()
|
room.getRoomSummaryLive()
|
||||||
if (!vectorPreferences.loadRoomAtFirstUnread()) {
|
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
|
if (!vectorPreferences.loadRoomAtFirstUnread()) {
|
||||||
tryOrNull { room.markAsRead(ReadService.MarkAsReadParams.READ_RECEIPT) }
|
tryOrNull { room.markAsRead(ReadService.MarkAsReadParams.READ_RECEIPT) }
|
||||||
|
} else {
|
||||||
|
tryOrNull { room.setMarkedUnread(false) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Inform the SDK that the room is displayed
|
// Inform the SDK that the room is displayed
|
||||||
|
|
Loading…
Reference in New Issue