Skip to content

Commit 7e1023b

Browse files
Remove magic number
1 parent fe2da9a commit 7e1023b

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class ThreadViewModel @Inject constructor(
258258
batchedMessages.postValue(ArrayList(output))
259259

260260
if (batch.size < batchSize) return
261-
delay(50L)
261+
delay(DELAY_BETWEEN_EACH_BATCHED_MESSAGES)
262262
sendBatchesRecursively(input.subList(batchSize, input.size), output)
263263
}
264264

@@ -458,5 +458,6 @@ class ThreadViewModel @Inject constructor(
458458
companion object {
459459
private const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
460460
private const val SUPER_COLLAPSED_BLOCK_FIRST_INDEX_LIMIT = 3
461+
private const val DELAY_BETWEEN_EACH_BATCHED_MESSAGES = 50L
461462
}
462463
}

0 commit comments

Comments
 (0)