From f9d931960b428d6364e886e8dded6a4cbc092bc0 Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 18 May 2020 18:47:16 +0200 Subject: [PATCH] rename param --- .../matrix/android/internal/session/sync/RoomSyncHandler.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/RoomSyncHandler.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/RoomSyncHandler.kt index 5c3b68cf4f..3be357920c 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/RoomSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/RoomSyncHandler.kt @@ -166,7 +166,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle roomSync.timeline.prevToken, roomSync.timeline.limited, syncLocalTimestampMillis, - !isInitialSync + isInitialSync ) roomEntity.addOrUpdate(chunkEntity) } @@ -264,7 +264,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle prevToken: String? = null, isLimited: Boolean = true, syncLocalTimestampMillis: Long, - decryptOnTheFly: Boolean): ChunkEntity { + isInitialSync: Boolean): ChunkEntity { val lastChunk = ChunkEntity.findLastLiveChunkFromRoom(realm, roomEntity.roomId) val chunkEntity = if (!isLimited && lastChunk != null) { lastChunk @@ -284,7 +284,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle } eventIds.add(event.eventId) - if (event.isEncrypted() && decryptOnTheFly) { + if (event.isEncrypted() && !isInitialSync) { decryptIfNeeded(event, roomId) }