Skip to content

Commit

Permalink
Fix ktLint / op-spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiritCroc committed Apr 12, 2022
1 parent 6a82302 commit 7c0cd1d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,20 +436,20 @@ 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
}
}
// 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
}
Expand Down

0 comments on commit 7c0cd1d

Please sign in to comment.