Merge branch 'fix-1028--update-ui-when-db-changes' into 'master'

Don't show apps/categories after disabling repo.

Closes #1028

See merge request !551
This commit is contained in:
Hans-Christoph Steiner 2017-06-30 14:17:12 +00:00
commit 5de66eae15
2 changed files with 7 additions and 3 deletions

View File

@ -807,7 +807,13 @@ public class AppProvider extends FDroidProvider {
db().execSQL(query, new String[] {String.valueOf(repoId)});
AppQuerySelection selection = new AppQuerySelection(where, whereArgs).add(queryRepo(repoId));
return db().delete(getTableName(), selection.getSelection(), selection.getArgs());
int result = db().delete(getTableName(), selection.getSelection(), selection.getArgs());
getContext().getContentResolver().notifyChange(ApkProvider.getContentUri(), null);
getContext().getContentResolver().notifyChange(AppProvider.getContentUri(), null);
getContext().getContentResolver().notifyChange(CategoryProvider.getContentUri(), null);
return result;
}
@Override

View File

@ -121,8 +121,6 @@ class CategoriesViewBinder implements LoaderManager.LoaderCallbacks<Cursor> {
emptyState.setVisibility(View.GONE);
categoriesList.setVisibility(View.VISIBLE);
}
cursor.close();
}
@Override