diff --git a/src/org/fdroid/fdroid/AppDetails.java b/src/org/fdroid/fdroid/AppDetails.java index 12a076472..d3b1a4ce9 100644 --- a/src/org/fdroid/fdroid/AppDetails.java +++ b/src/org/fdroid/fdroid/AppDetails.java @@ -502,8 +502,7 @@ public class AppDetails extends ListActivity { return true; DB.Apk curver = app.getCurrentVersion(); List toShow = new ArrayList(2); - if (app.installedVersion != null && curver != null - && !app.installedVersion.equals(curver.version)) { + if (app.hasUpdates == true) { toShow.add(menu.add(Menu.NONE, INSTALL, 0, R.string.menu_update).setIcon( R.drawable.ic_menu_refresh)); } diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index 8e8f37909..f2b7d9884 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -736,16 +736,14 @@ public class DB { if (getinstalledinfo) { // We'll say an application has updates if it's installed AND the - // installed version is not the 'current' one AND the installed - // version is older than the current one. + // version is older than the current one for (App app : result) { Apk curver = app.getCurrentVersion(); - if (curver != null && app.installedVersion != null - && !app.installedVersion.equals(curver.version)) { - if (app.installedVerCode < curver.vercode) { - app.hasUpdates = true; - app.updateVersion = curver.version; - } + if (curver != null + && app.installedVersion != null + && app.installedVerCode < curver.vercode) { + app.hasUpdates = true; + app.updateVersion = curver.version; } } }