From 80d609a69231496885acfe7bea10f040c1b28b1d Mon Sep 17 00:00:00 2001 From: Amine Date: Sun, 30 Mar 2025 14:14:03 +0200 Subject: [PATCH] fix: Infinite scroll needs loading stats. --- .../amine/apps/readerforselfossv2/android/HomeActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt index 7e4aa89..e89eea5 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt @@ -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()