diff --git a/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt b/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt index 25d9487da644fff2e6420c06914223fad997bc7f..f0c886a3941455f60b578b1bad86f1830728371b 100644 --- a/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt +++ b/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt @@ -41,7 +41,7 @@ class SystemAppsUpdatesRepository @Inject constructor( private val appLoungePackageManager: AppLoungePackageManager, ) { - private var systemAppProjectList = mutableListOf() + private val systemAppProjectList = mutableListOf() private fun getUpdatableSystemApps(): List { return systemAppProjectList.map { it.packageName } @@ -54,6 +54,7 @@ class SystemAppsUpdatesRepository @Inject constructor( } val response = updatableSystemAppsApi.getUpdatableSystemApps() if (response.isSuccessful && !response.body().isNullOrEmpty()) { + systemAppProjectList.clear() response.body()?.let { systemAppProjectList.addAll(it) } } else { Timber.e("Failed to fetch updatable apps: ${response.errorBody()?.string()}")