Skip to content

Commit 0879c64

Browse files
Remove magic number
1 parent bed45d8 commit 0879c64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadViewModel.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class ThreadViewModel @Inject constructor(
259259
batchedMessages.postValue(ArrayList(output))
260260

261261
if (batch.size < batchSize) return
262-
delay(50L)
262+
delay(DELAY_BETWEEN_EACH_BATCHED_MESSAGES)
263263
sendBatchesRecursively(input.subList(batchSize, input.size), output)
264264
}
265265

@@ -471,5 +471,6 @@ class ThreadViewModel @Inject constructor(
471471
companion object {
472472
private const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
473473
private const val SUPER_COLLAPSED_BLOCK_FIRST_INDEX_LIMIT = 3
474+
private const val DELAY_BETWEEN_EACH_BATCHED_MESSAGES = 50L
474475
}
475476
}

0 commit comments

Comments
 (0)