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:
SpiritCroc 2022-03-09 17:56:02 +01:00
parent cbdc28dd9b
commit 6c4e404ba1
2 changed files with 2 additions and 1 deletions

1
changelog.d/5481.bugfix Normal file
View File

@ -0,0 +1 @@
Fix sometimes read marker not properly updating

View File

@ -94,7 +94,7 @@ internal fun isReadMarkerMoreRecent(realmConfiguration: RealmConfiguration,
val eventToCheckIndex = eventToCheck?.displayIndex ?: Int.MAX_VALUE
eventToCheckIndex <= readMarkerIndex
} else {
eventToCheckChunk?.isLastForward == false
eventToCheckChunk?.isLastForward == false && readMarkerChunk?.isLastForward == true
}
}
}