Allow changing readmarker HasNoUnread -> HasUnread

When loading chats at the last read position, it can very well happen
that we load the event referenced by the unread marker at position 0
first, until more messages load after it. Accordingly, we can not assume
we are done here.

Change-Id: If4208315d50f4bd036b0b0638e9364a49b68561a
This commit is contained in:
SpiritCroc 2021-11-04 19:51:31 +01:00
parent d2a6360a7a
commit 30cd55d260

View File

@ -1037,7 +1037,7 @@ class RoomDetailViewModel @AssistedInject constructor(
.distinctUntilChanged { previous, current -> .distinctUntilChanged { previous, current ->
when { when {
previous is UnreadState.Unknown || previous is UnreadState.ReadMarkerNotLoaded -> false previous is UnreadState.Unknown || previous is UnreadState.ReadMarkerNotLoaded -> false
current is UnreadState.HasUnread || current is UnreadState.HasNoUnread -> true current is UnreadState.HasUnread /*|| current is UnreadState.HasNoUnread */ -> true
else -> false else -> false
} }
} }