Skip to content

Commit bed45d8

Browse files
Use already existing hasSuperCollapsedBlockBeenClicked
1 parent 6f66f51 commit bed45d8

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ class ThreadFragment : Fragment() {
429429
return@observe
430430
}
431431

432-
if (items.count() > ThreadViewModel.SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT) {
432+
if (threadState.hasSuperCollapsedBlockBeenClicked) {
433433
displayBatchedMessages(items)
434434
} else {
435435
threadAdapter.submitList(items)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ class ThreadViewModel @Inject constructor(
469469
}
470470

471471
companion object {
472-
const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
472+
private const val SUPER_COLLAPSED_BLOCK_MINIMUM_MESSAGES_LIMIT = 5
473473
private const val SUPER_COLLAPSED_BLOCK_FIRST_INDEX_LIMIT = 3
474474
}
475475
}

0 commit comments

Comments
 (0)