From 7c0cd1dc52e3ebb6f7b8be65a8da93f837b175f0 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Tue, 12 Apr 2022 19:16:48 +0200 Subject: [PATCH] Fix ktLint / op-spacing --- .../internal/session/room/timeline/TimelineChunk.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 1bd541c2a9..db90343422 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 @@ -436,8 +436,8 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity, // Check consistency to item before insertions if (range.startIndex > 0) { val firstInsertion = results[range.startIndex]!! - val lastBeforeInsertion = builtEvents[range.startIndex-1] - if (firstInsertion.displayIndex+1 != lastBeforeInsertion.displayIndex) { + val lastBeforeInsertion = builtEvents[range.startIndex - 1] + if (firstInsertion.displayIndex + 1 != lastBeforeInsertion.displayIndex) { Timber.i("handleDatabaseChangeSet: skip insertion at ${range.startIndex}/${builtEvents.size}, " + "displayIndex mismatch at ${range.startIndex}: ${firstInsertion.displayIndex} -> ${lastBeforeInsertion.displayIndex}") continue @@ -445,11 +445,11 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity, } // Check consistency to item after insertions if (range.startIndex < builtEvents.size) { - val lastInsertion = results[range.startIndex+range.length-1]!! + val lastInsertion = results[range.startIndex + range.length - 1]!! val firstAfterInsertion = builtEvents[range.startIndex] - if (firstAfterInsertion.displayIndex+1 != lastInsertion.displayIndex) { + if (firstAfterInsertion.displayIndex + 1 != lastInsertion.displayIndex) { Timber.i("handleDatabaseChangeSet: skip insertion at ${range.startIndex}/${builtEvents.size}, " + - "displayIndex mismatch at ${range.startIndex+range.length}: " + + "displayIndex mismatch at ${range.startIndex + range.length}: " + "${firstAfterInsertion.displayIndex} -> ${lastInsertion.displayIndex}") continue }