Skip to content

Commit

Permalink
Remove magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Oct 14, 2024
1 parent bed45d8 commit 0879c64
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class ThreadViewModel @Inject constructor(
batchedMessages.postValue(ArrayList(output))

if (batch.size < batchSize) return
delay(50L)
delay(DELAY_BETWEEN_EACH_BATCHED_MESSAGES)
sendBatchesRecursively(input.subList(batchSize, input.size), output)
}

Expand Down Expand Up @@ -471,5 +471,6 @@ class ThreadViewModel @Inject constructor(
companion object {
private const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
private const val SUPER_COLLAPSED_BLOCK_FIRST_INDEX_LIMIT = 3
private const val DELAY_BETWEEN_EACH_BATCHED_MESSAGES = 50L
}
}

0 comments on commit 0879c64

Please sign in to comment.