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

Commit 29de2c9e authored by Hasib Prince's avatar Hasib Prince
Browse files

resolved conflict: merging eipic59_refactoring_store_api

parents e572d178 1bdf0ff3
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import retrofit2.Response

class CleanApkAppsRepository(
    private val cleanAPKInterface: CleanAPKInterface,
    private val cleanApkAppDetailApi: CleanApkAppDetailApi
) : StoreRepository {

    override suspend fun getHomeScreenData(): Response<HomeScreen> {
+1 −4
Original line number Diff line number Diff line
@@ -24,10 +24,7 @@ import foundation.e.apps.api.cleanapk.data.search.Search
import foundation.e.apps.api.fused.utils.CategoryType
import retrofit2.Response

class CleanApkPWARepository(
    private val cleanAPKInterface: CleanAPKInterface,
    private val cleanApkAppDetailApi: CleanApkAppDetailApi
) : StoreRepository {
class CleanApkPWARepository(private val cleanAPKInterface: CleanAPKInterface) : StoreRepository {

    override suspend fun getHomeScreenData(): Any {
        return cleanAPKInterface.getHomeScreenData(
+1 −2
Original line number Diff line number Diff line
@@ -139,8 +139,7 @@ class GplayRepository @Inject constructor(
    override suspend fun getSearchSuggestions(query: String): List<SearchSuggestEntry> {
        val searchData = mutableListOf<SearchSuggestEntry>()
        withContext(Dispatchers.IO) {
            val searchHelper =
                SearchHelper(authData).using(gPlayHttpClient)
            val searchHelper = SearchHelper(authData).using(gPlayHttpClient)
            searchData.addAll(searchHelper.searchSuggestions(query))
        }
        return searchData.filter { it.suggestedQuery.isNotBlank() }
+5 −10
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import foundation.e.apps.api.StoreRepository
import foundation.e.apps.api.cleanapk.CleanAPKInterface
import foundation.e.apps.api.cleanapk.CleanApkAppDetailApi
import foundation.e.apps.api.cleanapk.CleanApkAppsRepository
import foundation.e.apps.api.cleanapk.CleanApkPWARepository
import foundation.e.apps.api.gplay.GplayRepository
import foundation.e.apps.api.gplay.utils.GPlayHttpClient
import foundation.e.apps.login.LoginSourceRepository
@@ -52,20 +53,14 @@ object NamedRepositoryModule {
    @Singleton
    @Provides
    @Named("cleanApkAppsRepository")
    fun getCleanApkAppsRepository(
        cleanAPKInterface: CleanAPKInterface,
        cleanApkAppDetailApi: CleanApkAppDetailApi
    ): StoreRepository {
        return CleanApkAppsRepository(cleanAPKInterface, cleanApkAppDetailApi)
    fun getCleanApkAppsRepository(cleanAPKInterface: CleanAPKInterface): StoreRepository {
        return CleanApkAppsRepository(cleanAPKInterface)
    }

    @Singleton
    @Provides
    @Named("cleanApkPWARepository")
    fun getCleanApkPWARepository(
        cleanAPKInterface: CleanAPKInterface,
        cleanApkAppDetailApi: CleanApkAppDetailApi
    ): StoreRepository {
        return CleanApkAppsRepository(cleanAPKInterface, cleanApkAppDetailApi)
    fun getCleanApkPWARepository(cleanAPKInterface: CleanAPKInterface): StoreRepository {
        return CleanApkPWARepository(cleanAPKInterface)
    }
}