diff --git a/app/src/main/java/foundation/e/apps/api/fused/FusedAPIImpl.kt b/app/src/main/java/foundation/e/apps/api/fused/FusedAPIImpl.kt index 3908f7bc746c79b2f99698ceed0b92a4aefe5acd..38884b92d2afe347e70f190f636f9503a515e9f6 100644 --- a/app/src/main/java/foundation/e/apps/api/fused/FusedAPIImpl.kt +++ b/app/src/main/java/foundation/e/apps/api/fused/FusedAPIImpl.kt @@ -851,6 +851,7 @@ class FusedAPIImpl @Inject constructor( response?.let { it.updateStatus() it.updateType() + it.updateSource() it.updateFilterLevel(authData) } }) @@ -1055,7 +1056,7 @@ class FusedAPIImpl @Inject constructor( private fun getCategoryIconName(category: FusedCategory): String { var categoryTitle = if (category.tag.getOperationalTag() - .contentEquals(AppTag.GPlay().getOperationalTag()) + .contentEquals(AppTag.GPlay().getOperationalTag()) ) category.id else category.title if (categoryTitle.contains(CATEGORY_TITLE_REPLACEABLE_CONJUNCTION)) { @@ -1394,6 +1395,14 @@ class FusedAPIImpl @Inject constructor( this.type = if (this.is_pwa) Type.PWA else Type.NATIVE } + private fun FusedApp.updateSource() { + this.apply { + source = if (origin == Origin.CLEANAPK && is_pwa) context.getString(R.string.pwa) + else if (origin == Origin.CLEANAPK) context.getString(R.string.open_source) + else "" + } + } + private fun MutableList.transformToList(): List { val list = mutableListOf() this.forEach { diff --git a/app/src/main/java/foundation/e/apps/application/ApplicationFragment.kt b/app/src/main/java/foundation/e/apps/application/ApplicationFragment.kt index 9dac14ef55d94221d87c0126ba17afa68ac9b08b..b84fbca35a8e09f920b327e32a6642c2c5599cbe 100644 --- a/app/src/main/java/foundation/e/apps/application/ApplicationFragment.kt +++ b/app/src/main/java/foundation/e/apps/application/ApplicationFragment.kt @@ -181,6 +181,10 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { if (applicationViewModel.appStatus.value == null) { applicationViewModel.appStatus.value = it.status } + + if (it.other_images_path.isEmpty()) { + binding.recyclerView.visibility = View.GONE + } screenshotsRVAdapter.setData(it.other_images_path) // Title widgets @@ -322,6 +326,10 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { appAuthor.text = it } categoryTitle.text = it.category + if (it.origin == Origin.CLEANAPK) { + sourceTag.visibility = View.VISIBLE + sourceTag.text = it.source + } if (origin == Origin.CLEANAPK) { appIcon.load(CleanAPKInterface.ASSET_URL + it.icon_image_path) } else { diff --git a/app/src/main/res/layout/fragment_application_download.xml b/app/src/main/res/layout/fragment_application_download.xml index c8f15a9157641bb32c2950198328e12e6ac137ba..fcf28d6f1e946de34441b56a07280ece7a70c6d1 100644 --- a/app/src/main/res/layout/fragment_application_download.xml +++ b/app/src/main/res/layout/fragment_application_download.xml @@ -23,6 +23,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_marginStart="20dp" android:layout_marginEnd="20dp" + android:layout_marginTop="10dp" android:gravity="end" android:orientation="horizontal"> diff --git a/app/src/main/res/layout/fragment_application_title.xml b/app/src/main/res/layout/fragment_application_title.xml index 65109c8b0577e6155e11abb2b4ab6525980b4e47..b87327fa179a458fa6517b8e06a6181abe28fad6 100644 --- a/app/src/main/res/layout/fragment_application_title.xml +++ b/app/src/main/res/layout/fragment_application_title.xml @@ -19,14 +19,16 @@ + android:layout_height="wrap_content" + android:orientation="vertical"> - + android:backgroundTint="@color/colorBackground"> - + + - + \ No newline at end of file