mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +03:00
Fix updating unread marker if not to latest chunk
SetReadMarkerTask was not updating the read marker when both the old and the new fully read eventId weren't in the last chunk, even when the new one was after the first one.
This commit is contained in:
parent
cbdc28dd9b
commit
6c4e404ba1
2 changed files with 2 additions and 1 deletions
1
changelog.d/5481.bugfix
Normal file
1
changelog.d/5481.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix sometimes read marker not properly updating
|
|
@ -94,7 +94,7 @@ internal fun isReadMarkerMoreRecent(realmConfiguration: RealmConfiguration,
|
||||||
val eventToCheckIndex = eventToCheck?.displayIndex ?: Int.MAX_VALUE
|
val eventToCheckIndex = eventToCheck?.displayIndex ?: Int.MAX_VALUE
|
||||||
eventToCheckIndex <= readMarkerIndex
|
eventToCheckIndex <= readMarkerIndex
|
||||||
} else {
|
} else {
|
||||||
eventToCheckChunk?.isLastForward == false
|
eventToCheckChunk?.isLastForward == false && readMarkerChunk?.isLastForward == true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue