From 4a3d9ba2d28cba8072fa17741ce34482384e21da Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 6 Jun 2024 09:58:01 -0300 Subject: [PATCH] [app] Don't add a fake installed version to app's version list when it isn't from current repo Doing this causes the "No compatible versions" message to not appear --- .../views/AppDetailsRecyclerViewAdapter.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java index 0ec0c9b1c..055c247ea 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java +++ b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java @@ -152,7 +152,6 @@ public class AppDetailsRecyclerViewAdapter // Get versions compatibleVersionsDifferentSigner.clear(); - if (apks != null) addInstalledApkIfExists(apks); boolean showIncompatibleVersions = Preferences.get().showIncompatibleVersions(); if (apks != null) { for (final Apk apk : apks) { @@ -199,19 +198,6 @@ public class AppDetailsRecyclerViewAdapter notifyItemChanged(0); // header changed } - private void addInstalledApkIfExists(final List apks) { - if (app == null) return; - Apk installedApk = app.getInstalledApk(context, apks); - // These conditions should be enough to determine if the installedApk - // is a generated dummy or a proper APK containing data from a repository. - if (installedApk != null && installedApk.added == null && installedApk.signer == null) { - installedApk.compatible = true; - installedApk.signer = app.installedSigner; - installedApk.maxSdkVersion = -1; - apks.add(installedApk); - } - } - void setShowVersions(boolean showVersions) { setShowVersions(showVersions, false); }