Fix updating read marker automatically

Change-Id: I84a51127dc7b434622ecdcab350c788ee3d623be
This commit is contained in:
SpiritCroc 2021-05-01 11:35:39 +02:00
parent 2605c6ac9b
commit 35a9c8a12f
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ class RoomDetailViewModel @AssistedInject constructor(
private fun stopTrackingUnreadMessages() {
if (trackUnreadMessages.getAndSet(false)) {
mostRecentDisplayedEvent?.root?.eventId?.also {
viewModelScope.launch {
viewModelScope.launch(NonCancellable) {
tryOrNull { room.setReadMarker(it) }
}
}