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

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

issue_5413_2: create getAppsListOSS() in FusedAPIRepository

parent 25dd2c78
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -171,6 +171,21 @@ class FusedAPIRepository @Inject constructor(
        }
    }

    /*
     * Get only category apps from cleanapk.
     * Issue: https://gitlab.e.foundation/e/backlog/-/issues/5413 [2]
     */
    suspend fun getAppsListOSS(
        category: String,
        source: String,
    ): ResultSupreme<List<FusedApp>> {
        return when (source) {
            "Open Source" -> fusedAPIImpl.getOpenSourceApps(category)
            "PWA" -> fusedAPIImpl.getPWAApps(category)
            else -> ResultSupreme.Error()
        }
    }

    fun getFusedAppInstallationStatus(fusedApp: FusedApp): Status {
        return fusedAPIImpl.getFusedAppInstallationStatus(fusedApp)
    }