From 2498da3631312180df925b1ac0607678a75a8c3c Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Wed, 9 Mar 2022 17:56:02 +0100 Subject: [PATCH] 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. Change-Id: I175b335cf90328f676238ca23e45aa0f91b269c9 --- .../matrix/android/sdk/internal/database/query/ReadQueries.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ReadQueries.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ReadQueries.kt index 51dec631d5..9183e86848 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ReadQueries.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ReadQueries.kt @@ -95,7 +95,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 } } }