Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddc34884 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

Merge branch '8124-fix_duplicate_system_app_updates' into 'main'

fix: (issue 8124) duplicate apps in update list

See merge request !479
parents 42647a4f 7ffd5fa7
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ class SystemAppsUpdatesRepository @Inject constructor(
    private val appLoungePackageManager: AppLoungePackageManager,
) {

    private var systemAppProjectList = mutableListOf<SystemAppProject>()
    private val systemAppProjectList = mutableListOf<SystemAppProject>()

    private fun getUpdatableSystemApps(): List<String> {
        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()}")