fix: Infinite scroll needs loading stats.
All checks were successful
PR / translations (pull_request) Successful in 31s
PR / PR (pull_request) Successful in 41s
PR / build (pull_request) Successful in 16m2s
PR test / integrationTests (pull_request) Successful in 43m44s

This commit is contained in:
Amine Bouabdallaoui 2025-03-30 14:14:03 +02:00
parent bdf2bb8b31
commit 22c966bf16

View File

@ -459,6 +459,7 @@ class HomeActivity :
appendResults: Boolean,
itemType: ItemType,
) {
@Suppress("detekt:ComplexCondition")
if ((appendResults && items.size > 0) || (!appendResults && items.size == 0)) {
CountingIdlingResourceSingleton.increment()
binding.swipeRefreshLayout.isRefreshing = true
@ -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()