Merge commit 'refs/merge-requests/49' of gitorious.org:f-droid/fdroidclient
This commit is contained in:
commit
bab1e6536c
@ -502,8 +502,7 @@ public class AppDetails extends ListActivity {
|
|||||||
return true;
|
return true;
|
||||||
DB.Apk curver = app.getCurrentVersion();
|
DB.Apk curver = app.getCurrentVersion();
|
||||||
List<MenuItem> toShow = new ArrayList<MenuItem>(2);
|
List<MenuItem> toShow = new ArrayList<MenuItem>(2);
|
||||||
if (app.installedVersion != null && curver != null
|
if (app.hasUpdates == true) {
|
||||||
&& !app.installedVersion.equals(curver.version)) {
|
|
||||||
toShow.add(menu.add(Menu.NONE, INSTALL, 0, R.string.menu_update).setIcon(
|
toShow.add(menu.add(Menu.NONE, INSTALL, 0, R.string.menu_update).setIcon(
|
||||||
R.drawable.ic_menu_refresh));
|
R.drawable.ic_menu_refresh));
|
||||||
}
|
}
|
||||||
|
@ -736,19 +736,17 @@ public class DB {
|
|||||||
if (getinstalledinfo) {
|
if (getinstalledinfo) {
|
||||||
|
|
||||||
// We'll say an application has updates if it's installed AND the
|
// 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) {
|
for (App app : result) {
|
||||||
Apk curver = app.getCurrentVersion();
|
Apk curver = app.getCurrentVersion();
|
||||||
if (curver != null && app.installedVersion != null
|
if (curver != null
|
||||||
&& !app.installedVersion.equals(curver.version)) {
|
&& app.installedVersion != null
|
||||||
if (app.installedVerCode < curver.vercode) {
|
&& app.installedVerCode < curver.vercode) {
|
||||||
app.hasUpdates = true;
|
app.hasUpdates = true;
|
||||||
app.updateVersion = curver.version;
|
app.updateVersion = curver.version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user