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

Verified Commit aa3401a7 authored by Saalim Quadri's avatar Saalim Quadri
Browse files

feat: adapt to updated gplayapi SearchBundle API changes



- Remove SearchBundle import and usage
- Update PlayStoreSearchHelper to extract clusterAppList from StreamClusters
- Fix return type from setOf<SearchBundle.SubBundle>() to Boolean

Signed-off-by: default avatarSaalim Quadri <danascape@gmail.com>
parent e925b86d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
package foundation.e.apps.data.application.search

import android.content.Context
import com.aurora.gplayapi.data.models.SearchBundle
import dagger.hilt.android.qualifiers.ApplicationContext
import foundation.e.apps.data.ResultSupreme
import foundation.e.apps.data.Stores
@@ -248,7 +247,7 @@ class SearchRepositoryImpl @Inject constructor(
            if (!stores.isStoreEnabled(source)) {
                return@handleNetworkResult Pair(
                    listOf<Application>(),
                    setOf<SearchBundle.SubBundle>()
                    false
                )
            }

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class PlayStoreSearchHelper @Inject constructor(
    suspend fun getSearchResults(keyword: String) = withContext(Dispatchers.IO) {
        WebSearchHelper()
            .using(gPlayHttpClient)
            .searchResults(keyword).appList
            .searchResults(keyword).streamClusters.values.firstOrNull()?.clusterAppList ?: emptyList()
    }

    suspend fun getSearchSuggestions(keyword: String) = withContext(Dispatchers.IO) {