Don't list apps with zero apks

After removing one or more repos, remove all the apps which don't have any
apks listed from the database.
This commit is contained in:
Daniel Martí 2013-07-21 17:49:56 +02:00
parent 4b32f92777
commit 930cf7d613

View File

@ -1350,6 +1350,12 @@ public class DB {
}
db.delete(TABLE_REPO, "address = ?", new String[] { address });
}
List<App> apps = getAppsBasic(true);
for (App app : apps) {
if (app.apks.isEmpty()) {
db.delete(TABLE_APP, "id = ?", new String[] { app.id });
}
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();