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

Commit 077830f0 authored by Hasib Prince's avatar Hasib Prince
Browse files

placeholder item is added

parent b22df4ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@ android {

    buildTypes {
        debug {
//            versionNameSuffix ".debug"
//            applicationIdSuffix ".debug"
            signingConfig signingConfigs.debugConfig
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
+5 −2
Original line number Diff line number Diff line
@@ -1461,16 +1461,19 @@ class FusedApiImpl @Inject constructor(
        category: String,
        pageUrl: String?
    ): ResultSupreme<Pair<List<FusedApp>, String>> {
        var fusedAppList: List<FusedApp> = mutableListOf()
        var fusedAppList: MutableList<FusedApp> = mutableListOf()
        var nextPageUrl = ""

        val status = runCodeBlockWithTimeout({
            val streamCluster = gplayRepository.getAppsByCategory(category, pageUrl) as StreamCluster
            val filteredAppList = filterRestrictedGPlayApps(authData, streamCluster.clusterAppList)
            filteredAppList.data?.let {
                fusedAppList = it
                fusedAppList = it.toMutableList()
            }
            nextPageUrl = streamCluster.clusterNextPageUrl
            if (!nextPageUrl.isNullOrEmpty()) {
                fusedAppList.add(FusedApp(isPlaceHolder = true))
            }
        })

        return ResultSupreme.create(status, Pair(fusedAppList, nextPageUrl))
+3 −1
Original line number Diff line number Diff line
@@ -132,7 +132,9 @@ class ApplicationListViewModel @Inject constructor(
            isLoading = false

            result.data?.let {
                val appList = appListLiveData.value?.data?.plus(it.first)
                val currentAppList = appListLiveData.value?.data?.toMutableList()
                currentAppList?.removeIf { item -> item.isPlaceHolder }
                val appList = currentAppList?.plus(it.first)
                val resultSupreme = ResultSupreme.create(ResultStatus.OK, appList)
                appListLiveData.postValue(resultSupreme)
                /*