diff --git a/app/src/main/java/foundation/e/apps/data/fused/FusedApiImpl.kt b/app/src/main/java/foundation/e/apps/data/fused/FusedApiImpl.kt index 5aa83c320f7bfc44dc45372b65b422d65c6751f4..be264e01b181cc9088c7d4a78e742854cdd10a96 100644 --- a/app/src/main/java/foundation/e/apps/data/fused/FusedApiImpl.kt +++ b/app/src/main/java/foundation/e/apps/data/fused/FusedApiImpl.kt @@ -286,10 +286,11 @@ class FusedApiImpl @Inject constructor( val result = handleNetworkResult { val apps = cleanApkPWARepository.getSearchResult(query).body()?.apps - apps?.apply { - if (this.isNotEmpty()) { - pwaApps.addAll(this) - } + apps?.forEach { + it.updateStatus() + it.updateType() + it.updateSource() + pwaApps.add(it) } } @@ -1010,8 +1011,7 @@ class FusedApiImpl @Inject constructor( response?.forEach { it.updateStatus() it.updateType() - it.source = - if (source.contentEquals(CleanApkRetrofit.APP_SOURCE_FOSS)) "Open Source" else "PWA" + it.updateSource() list.add(it) } return list