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

Commit 92611c1f authored by Hasib Prince's avatar Hasib Prince
Browse files

handled state of app list

parent 077830f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ dependencies {

    // TODO: Add splitinstall-lib to a repo https://gitlab.e.foundation/e/os/backlog/-/issues/628
    api files('libs/splitinstall-lib.jar')
    api files('libs/gplayapi-3.0.1.jar')
    api files('libs/gplayapi-3.0.4.jar')

    implementation 'foundation.e.lib:telemetry:0.0.8-alpha'

app/libs/gplayapi-3.0.1.jar

deleted100644 → 0
−3.79 MiB

File deleted.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+3 −3
Original line number Diff line number Diff line
@@ -28,13 +28,13 @@ import com.aurora.gplayapi.data.models.SearchBundle
import com.aurora.gplayapi.data.models.StreamBundle
import com.aurora.gplayapi.data.models.StreamCluster
import com.aurora.gplayapi.helpers.AppDetailsHelper
import com.aurora.gplayapi.helpers.CategoryAppsHelper
import com.aurora.gplayapi.helpers.CategoryHelper
import com.aurora.gplayapi.helpers.Chart
import com.aurora.gplayapi.helpers.ExpandedBrowseHelper
import com.aurora.gplayapi.helpers.PurchaseHelper
import com.aurora.gplayapi.helpers.SearchHelper
import com.aurora.gplayapi.helpers.StreamHelper
import com.aurora.gplayapi.helpers.SubCategoryHelper
import com.aurora.gplayapi.helpers.TopChartsHelper
import dagger.hilt.android.qualifiers.ApplicationContext
import foundation.e.apps.R
@@ -163,7 +163,7 @@ class GplayStoreRepositoryImpl @Inject constructor(

    override suspend fun getAppsByCategory(category: String, paginationParameter: Any?): StreamCluster {
        val subCategoryHelper =
            SubCategoryHelper(authData).using(gPlayHttpClient)
            CategoryAppsHelper(authData).using(gPlayHttpClient)

        paginationParameter?.let {
            if (it is String && it.isNotEmpty()) {
@@ -171,7 +171,7 @@ class GplayStoreRepositoryImpl @Inject constructor(
            }
        }

        return subCategoryHelper.getSubCategoryApps(category.uppercase(), paginationParameter?.toString())
        return subCategoryHelper.getCategoryAppsList(category.uppercase())
    }

    override suspend fun getCategories(type: CategoryType?): List<Category> {
+7 −11
Original line number Diff line number Diff line
@@ -55,6 +55,11 @@ class ApplicationListViewModel @Inject constructor(
    ) {
        super.onLoadData(authObjectList, { successAuthList, _ ->

            if (appListLiveData.value?.data?.isNotEmpty() == true) {
                appListLiveData.postValue(appListLiveData.value)
                return@onLoadData
            }

            successAuthList.find { it is AuthObject.GPlayAuth }?.run {
                getList(category, result.data!! as AuthData, source)
                return@onLoadData
@@ -137,16 +142,7 @@ class ApplicationListViewModel @Inject constructor(
                val appList = currentAppList?.plus(it.first)
                val resultSupreme = ResultSupreme.create(ResultStatus.OK, appList)
                appListLiveData.postValue(resultSupreme)
                /*
             * Check if a placeholder app is to be added at the end.
             * If yes then post the updated result.
             * We post this separately as it helps clear any previous placeholder app
             * and ensures only a single placeholder app is present at the end of the
             * list, and none at the middle of the list.
             */
                if (result.isSuccess() && it.second.isNotEmpty()) {
                    appListLiveData.postValue(resultSupreme)
                }

                updateNextPageUrl(it.second)
            }
        }