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:
commit
5de66eae15
@ -807,7 +807,13 @@ public class AppProvider extends FDroidProvider {
|
|||||||
db().execSQL(query, new String[] {String.valueOf(repoId)});
|
db().execSQL(query, new String[] {String.valueOf(repoId)});
|
||||||
|
|
||||||
AppQuerySelection selection = new AppQuerySelection(where, whereArgs).add(queryRepo(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
|
@Override
|
||||||
|
@ -121,8 +121,6 @@ class CategoriesViewBinder implements LoaderManager.LoaderCallbacks<Cursor> {
|
|||||||
emptyState.setVisibility(View.GONE);
|
emptyState.setVisibility(View.GONE);
|
||||||
categoriesList.setVisibility(View.VISIBLE);
|
categoriesList.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user