mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-01 11:46:57 +01:00
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:
parent
d2a6360a7a
commit
30cd55d260
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user