Save ignore settings in onPause, fixes #409

This commit is contained in:
Daniel Martí 2013-11-16 23:26:03 +01:00
parent f7b3e0b81c
commit afb5762a71

View File

@ -295,6 +295,16 @@ public class AppDetails extends ListActivity {
if (downloadHandler != null) {
downloadHandler.stopUpdates();
}
if (app != null && (app.ignoreAllUpdates != startingIgnoreAll
|| app.ignoreThisUpdate != startingIgnoreThis)) {
try {
DB db = DB.getDB();
db.setIgnoreUpdates(app.id,
app.ignoreAllUpdates, app.ignoreThisUpdate);
} finally {
DB.releaseDB();
}
}
super.onPause();
}
@ -1007,19 +1017,4 @@ public class AppDetails extends ListActivity {
}
}
@Override
public void finish() {
if (app != null && (app.ignoreAllUpdates != startingIgnoreAll
|| app.ignoreThisUpdate != startingIgnoreThis)) {
try {
DB db = DB.getDB();
db.setIgnoreUpdates(app.id,
app.ignoreAllUpdates, app.ignoreThisUpdate);
} finally {
DB.releaseDB();
}
}
super.finish();
}
}