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

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

issue_5413: Fused API - use ResultSupreme for getApplicationDetailsOSS()

parent f101ccd9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -622,7 +622,7 @@ class FusedAPIImpl @Inject constructor(
     */
    suspend fun getApplicationDetailsOSS(
        packageNameList: List<String>,
    ): Pair<List<FusedApp>, ResultStatus> {
    ): ResultSupreme<List<FusedApp>> {
        val list = mutableListOf<FusedApp>()

        val response: Pair<List<FusedApp>, ResultStatus> =
@@ -635,7 +635,11 @@ class FusedAPIImpl @Inject constructor(
            }
        }

        return Pair(list, response.second)
        return ResultSupreme.create(response.second, list.toList()).apply {
            if (!isSuccess()) {
                message = true.toString()
            }
        }
    }

    suspend fun getApplicationDetails(
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ class FusedAPIRepository @Inject constructor(

    suspend fun getApplicationDetailsOSS(
        packageNameList: List<String>,
    ): Pair<List<FusedApp>, ResultStatus> {
    ): ResultSupreme<List<FusedApp>> {
        return fusedAPIImpl.getApplicationDetailsOSS(packageNameList)
    }