fix: Infinite scroll needs loading stats.
Some checks failed
Check PR code / Lint (pull_request) Successful in 1m15s
Check PR code / translations (pull_request) Successful in 46s
Check PR code / build (pull_request) Failing after 20m4s

This commit is contained in:
Amine Bouabdallaoui 2025-03-30 14:14:03 +02:00
parent 266a157f20
commit 80d609a692

View File

@ -463,6 +463,7 @@ class HomeActivity :
appendResults: Boolean,
itemType: ItemType,
) {
@Suppress("detekt:ComplexCondition")
if ((appendResults && items.size > 0) || (!appendResults && items.size == 0)) {
CountingIdlingResourceSingleton.increment()
CoroutineScope(Dispatchers.Main).launch {
@ -539,7 +540,10 @@ class HomeActivity :
}
private fun reloadBadges() {
if (appSettingsService.isDisplayUnreadCountEnabled() || appSettingsService.isDisplayAllCountEnabled()) {
if (appSettingsService.isInfiniteLoadingEnabled() ||
appSettingsService.isDisplayUnreadCountEnabled() ||
appSettingsService.isDisplayAllCountEnabled()
) {
CountingIdlingResourceSingleton.increment()
CoroutineScope(Dispatchers.IO).launch {
repository.reloadBadges()