From bea4cca2ab1b4d6dfcd06dbdd52a97774b2ef6c2 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sat, 19 Mar 2022 11:51:19 +0100 Subject: [PATCH] Fix crash on Android 6 Change-Id: Ie32c3dbc4b22afd673c5dcf581f8743f27d5bfc3 --- .../android/sdk/internal/session/room/timeline/TimelineChunk.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt index 8e0bf1a66b..3e3674af99 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt @@ -493,7 +493,7 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity, for (range in modifications) { for (modificationIndex in (range.startIndex until range.startIndex + range.length)) { val updatedEntity = results[modificationIndex] ?: continue - val displayIndex = builtEventsIndexes.getOrDefault(updatedEntity.eventId, null) + val displayIndex = builtEventsIndexes[updatedEntity.eventId] if (displayIndex == null) { dimber.w{"TimelineChunk.handleDatabaseChangeSet.$dbgId: skip modification for ${updatedEntity.eventId} at $modificationIndex, not found in chunk"} continue