From b2af35352ed0c43a4e2553a266e866c154350d1d Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Thu, 11 Dec 2025 16:14:29 +0600 Subject: [PATCH] fix: resolve showing progress percentage while downloading apps AppsFragment observes DownloadProgressLD LiveData to get progress update when an app gets downloaded. For apps with Status.INSTALLATION_ISSUE in the database, they were interfering with the update logic of the LiveData and hence the UI was not getting the updates from it. This commit fixes the issue by filtering the faulty apps beforehand. --- .../e/apps/install/download/data/DownloadProgressLD.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/foundation/e/apps/install/download/data/DownloadProgressLD.kt b/app/src/main/java/foundation/e/apps/install/download/data/DownloadProgressLD.kt index d017c2d65..0ee394297 100644 --- a/app/src/main/java/foundation/e/apps/install/download/data/DownloadProgressLD.kt +++ b/app/src/main/java/foundation/e/apps/install/download/data/DownloadProgressLD.kt @@ -27,6 +27,7 @@ import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.LiveData import androidx.lifecycle.Observer +import foundation.e.apps.data.enums.Status import foundation.e.apps.data.install.AppManagerWrapper import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -56,6 +57,7 @@ class DownloadProgressLD @Inject constructor( launch { while (hasActiveObservers() || owner.lifecycle.currentState == Lifecycle.State.RESUMED) { val downloads = appManagerWrapper.getDownloadList() + .filterNot { it.status == Status.INSTALLATION_ISSUE } val downloadingList = downloads.map { it.downloadIdMap }.filter { it.values.contains(false) } val downloadingIds = mutableListOf() -- GitLab