isReadMarkerMoreRecent(): use helper to properly compare chunks

Change-Id: I878b8145d3a9c85ea815f369e5d8f810343c8f62
This commit is contained in:
SpiritCroc 2022-03-10 20:22:38 +01:00
parent 6aabb38c3b
commit 24133ba7b5

View file

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