mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-05-19 22:19:50 -04:00
[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
This commit is contained in:
@@ -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<Apk> 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user