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

Commit 3db52bc4 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

fix showing already up-to-date system apps

parent 666ff2c3
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -128,10 +128,13 @@ class UpdatesManagerImpl @Inject constructor(

        val nonFaultyUpdateList = faultyAppRepository.removeFaultyApps(updateList)

        val systemApps = getSystemUpdates(false).toMutableList()
        getUpdatesFromApi({
            val systemApps = getSystemUpdates().toMutableList()
            putAppLoungeAtLast(systemApps)
            Pair(systemApps, ResultStatus.OK)
        }, updateList)

        return Pair(nonFaultyUpdateList + systemApps, status)
        return Pair(nonFaultyUpdateList, status)
    }

    suspend fun getUpdatesOSS(): Pair<List<Application>, ResultStatus> {
@@ -166,10 +169,13 @@ class UpdatesManagerImpl @Inject constructor(

        val nonFaultyUpdateList = faultyAppRepository.removeFaultyApps(updateList)

        val systemApps = getSystemUpdates(false).toMutableList()
        getUpdatesFromApi({
            val systemApps = getSystemUpdates().toMutableList()
            putAppLoungeAtLast(systemApps)
            Pair(systemApps, ResultStatus.OK)
        }, updateList)

        return Pair(nonFaultyUpdateList + systemApps, status)
        return Pair(nonFaultyUpdateList, status)
    }

    suspend fun getSystemUpdates(): List<Application> = applicationRepository.getSystemUpdates()