Skip to content

Commit 0ad8281

Browse files
Use already existing hasSuperCollapsedBlockBeenClicked
1 parent e157807 commit 0ad8281

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ class ThreadFragment : Fragment() {
414414
return@observe
415415
}
416416

417-
if (items.count() > ThreadViewModel.SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT) {
417+
if (threadState.hasSuperCollapsedBlockBeenClicked) {
418418
displayBatchedMessages(items)
419419
} else {
420420
threadAdapter.submitList(items)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class ThreadViewModel @Inject constructor(
456456
}
457457

458458
companion object {
459-
const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
459+
private const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
460460
private const val SUPER_COLLAPSED_BLOCK_FIRST_INDEX_LIMIT = 3
461461
}
462462
}

0 commit comments

Comments
 (0)