From 2b7585c1cffceeb635879cc295ea52a2c9ab3949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 25 May 2013 23:01:50 +0200 Subject: [PATCH] Check current version by signature as well This prevents multiple versions shown as installed, which might happen if many repos are used and contain the same versions of some app. --- src/org/fdroid/fdroid/AppDetails.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/org/fdroid/fdroid/AppDetails.java b/src/org/fdroid/fdroid/AppDetails.java index aca27650e..1238cf858 100644 --- a/src/org/fdroid/fdroid/AppDetails.java +++ b/src/org/fdroid/fdroid/AppDetails.java @@ -118,11 +118,9 @@ public class AppDetails extends ListActivity { version.setText(getString(R.string.version) + " " + apk.version + (iscurrent ? "*" : "")); - // TODO: This will show 'Installed' for all apks with the same - // version code, which could be more than one if they come from - // different repos or are source/binary from the same one! TextView status = (TextView) v.findViewById(R.id.status); - if (apk.vercode == app.installedVerCode) + if (apk.vercode == app.installedVerCode + && apk.sig.equals(mInstalledSigID)) status.setText(getString(R.string.inst)); else status.setText(getString(R.string.not_inst));