Loading app/src/main/java/foundation/e/apps/api/fused/FusedAPIImpl.kt +37 −37 Original line number Diff line number Diff line Loading @@ -244,7 +244,16 @@ class FusedAPIImpl @Inject constructor( query, searchResult, packageSpecificResults )?.let { emit(it) } ).let { emit(it) } } if (preferenceManagerModule.isPWASelected()) { fetchPWASearchResult( this@FusedAPIImpl, query, searchResult, packageSpecificResults ).let { emit(it) } } if (preferenceManagerModule.isGplaySelected()) { Loading @@ -257,15 +266,6 @@ class FusedAPIImpl @Inject constructor( ) ) } if (preferenceManagerModule.isPWASelected()) { fetchPWASearchResult( this@FusedAPIImpl, query, searchResult, packageSpecificResults )?.let { emit(it) } } } } Loading @@ -274,7 +274,7 @@ class FusedAPIImpl @Inject constructor( query: String, searchResult: MutableList<FusedApp>, packageSpecificResults: ArrayList<FusedApp> ): ResultSupreme<Pair<List<FusedApp>, Boolean>>? { ): ResultSupreme<Pair<List<FusedApp>, Boolean>> { val pwaApps: MutableList<FusedApp> = mutableListOf() val status = fusedAPIImpl.runCodeBlockWithTimeout({ getCleanAPKSearchResults( Loading @@ -290,6 +290,8 @@ class FusedAPIImpl @Inject constructor( if (pwaApps.isNotEmpty() || status != ResultStatus.OK) { searchResult.addAll(pwaApps) } return ResultSupreme.create( status, Pair( Loading @@ -298,12 +300,10 @@ class FusedAPIImpl @Inject constructor( packageSpecificResults, query ), false preferenceManagerModule.isGplaySelected() ) ) } return null } private fun fetchGplaySearchResults( query: String, Loading Loading @@ -333,13 +333,15 @@ class FusedAPIImpl @Inject constructor( query: String, searchResult: MutableList<FusedApp>, packageSpecificResults: ArrayList<FusedApp> ): ResultSupreme<Pair<List<FusedApp>, Boolean>>? { ): ResultSupreme<Pair<List<FusedApp>, Boolean>> { val status = fusedAPIImpl.runCodeBlockWithTimeout({ cleanApkResults.addAll(getCleanAPKSearchResults(query)) }) if (cleanApkResults.isNotEmpty() || status != ResultStatus.OK) { if (cleanApkResults.isNotEmpty()) { searchResult.addAll(cleanApkResults) } return ResultSupreme.create( status, Pair( Loading @@ -352,8 +354,6 @@ class FusedAPIImpl @Inject constructor( ) ) } return null } private suspend fun fetchPackageSpecificResult( authData: AuthData, Loading app/src/main/java/foundation/e/apps/search/SearchFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ class SearchFragment : private fun observeSearchResult(listAdapter: ApplicationListRVAdapter?) { searchViewModel.searchResult.observe(viewLifecycleOwner) { if (it.data?.first.isNullOrEmpty()) { if (it.data?.first.isNullOrEmpty() && it.data?.second == false) { noAppsFoundLayout?.visibility = View.VISIBLE } else { if (!updateSearchResult(listAdapter, it)) return@observe Loading Loading
app/src/main/java/foundation/e/apps/api/fused/FusedAPIImpl.kt +37 −37 Original line number Diff line number Diff line Loading @@ -244,7 +244,16 @@ class FusedAPIImpl @Inject constructor( query, searchResult, packageSpecificResults )?.let { emit(it) } ).let { emit(it) } } if (preferenceManagerModule.isPWASelected()) { fetchPWASearchResult( this@FusedAPIImpl, query, searchResult, packageSpecificResults ).let { emit(it) } } if (preferenceManagerModule.isGplaySelected()) { Loading @@ -257,15 +266,6 @@ class FusedAPIImpl @Inject constructor( ) ) } if (preferenceManagerModule.isPWASelected()) { fetchPWASearchResult( this@FusedAPIImpl, query, searchResult, packageSpecificResults )?.let { emit(it) } } } } Loading @@ -274,7 +274,7 @@ class FusedAPIImpl @Inject constructor( query: String, searchResult: MutableList<FusedApp>, packageSpecificResults: ArrayList<FusedApp> ): ResultSupreme<Pair<List<FusedApp>, Boolean>>? { ): ResultSupreme<Pair<List<FusedApp>, Boolean>> { val pwaApps: MutableList<FusedApp> = mutableListOf() val status = fusedAPIImpl.runCodeBlockWithTimeout({ getCleanAPKSearchResults( Loading @@ -290,6 +290,8 @@ class FusedAPIImpl @Inject constructor( if (pwaApps.isNotEmpty() || status != ResultStatus.OK) { searchResult.addAll(pwaApps) } return ResultSupreme.create( status, Pair( Loading @@ -298,12 +300,10 @@ class FusedAPIImpl @Inject constructor( packageSpecificResults, query ), false preferenceManagerModule.isGplaySelected() ) ) } return null } private fun fetchGplaySearchResults( query: String, Loading Loading @@ -333,13 +333,15 @@ class FusedAPIImpl @Inject constructor( query: String, searchResult: MutableList<FusedApp>, packageSpecificResults: ArrayList<FusedApp> ): ResultSupreme<Pair<List<FusedApp>, Boolean>>? { ): ResultSupreme<Pair<List<FusedApp>, Boolean>> { val status = fusedAPIImpl.runCodeBlockWithTimeout({ cleanApkResults.addAll(getCleanAPKSearchResults(query)) }) if (cleanApkResults.isNotEmpty() || status != ResultStatus.OK) { if (cleanApkResults.isNotEmpty()) { searchResult.addAll(cleanApkResults) } return ResultSupreme.create( status, Pair( Loading @@ -352,8 +354,6 @@ class FusedAPIImpl @Inject constructor( ) ) } return null } private suspend fun fetchPackageSpecificResult( authData: AuthData, Loading
app/src/main/java/foundation/e/apps/search/SearchFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ class SearchFragment : private fun observeSearchResult(listAdapter: ApplicationListRVAdapter?) { searchViewModel.searchResult.observe(viewLifecycleOwner) { if (it.data?.first.isNullOrEmpty()) { if (it.data?.first.isNullOrEmpty() && it.data?.second == false) { noAppsFoundLayout?.visibility = View.VISIBLE } else { if (!updateSearchResult(listAdapter, it)) return@observe Loading