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

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

rename methods

parent 2455c2ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,6 +29,6 @@ interface EligibleSystemAppsApi {
    }

    @GET("updatable_system_apps.json?inline=false")
    suspend fun getAllEligibleApps(): Response<List<SystemAppProject>>
    suspend fun getUpdatableSystemApps(): Response<List<SystemAppProject>>

}
+4 −4
Original line number Diff line number Diff line
@@ -43,9 +43,9 @@ class SystemAppsUpdatesRepository @Inject constructor(

    private var systemAppProjectList = mutableListOf<SystemAppProject>()

    suspend fun fetchAllEligibleApps() {
    suspend fun fetchEligibleSystemApps() {
        val result = handleNetworkResult {
            val response = eligibleSystemAppsApi.getAllEligibleApps()
            val response = eligibleSystemAppsApi.getUpdatableSystemApps()
            if (response.isSuccessful && !response.body().isNullOrEmpty()) {
                response.body()?.let { systemAppProjectList.addAll(it) }
            } else {
@@ -58,7 +58,7 @@ class SystemAppsUpdatesRepository @Inject constructor(
        }
    }

    fun getAllEligibleApps(): List<String> {
    fun getEligibleSystemApps(): List<String> {
        return systemAppProjectList.map { it.packageName }
    }

@@ -117,7 +117,7 @@ class SystemAppsUpdatesRepository @Inject constructor(
        val sdkLevel = getSdkLevel()
        val device = getDevice()

        val eligibleApps = getAllEligibleApps()
        val eligibleApps = getEligibleSystemApps()
        eligibleApps.forEach {

            if (!appLoungePackageManager.isInstalled(it)) {