From 2c313504886cc635b69d67765f7a0e5ad6e71c2b Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Fri, 19 Oct 2012 08:41:54 +0100 Subject: [PATCH] Use code, not name, for flagging installed version in apk list --- src/org/fdroid/fdroid/AppDetails.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/fdroid/fdroid/AppDetails.java b/src/org/fdroid/fdroid/AppDetails.java index de51d11e0..277a3f8f3 100644 --- a/src/org/fdroid/fdroid/AppDetails.java +++ b/src/org/fdroid/fdroid/AppDetails.java @@ -112,11 +112,16 @@ public class AppDetails extends ListActivity { boolean iscurrent = apk.vercode == app_currentvercode; 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.version.equals(app.installedVersion)) + if (apk.vercode == app.installedVerCode) status.setText(getString(R.string.inst)); else status.setText(getString(R.string.not_inst)); + TextView size = (TextView) v.findViewById(R.id.size); if (apk.detail_size == 0) { size.setText("");