Don't show apps/categories after disabling repo.
This was setup to work correctly, but for two problems: * The `cursor.close()` in `CategoriesViewBinder` stops the cursor from being requeried when required. * The `AppProvider` was not notifying correctly after deleting apps belonging to a repo. Fixes #1028.
This commit is contained in:
		
							parent
							
								
									61ab88f8ea
								
							
						
					
					
						commit
						b658c0b44e
					
				@ -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
 | 
			
		||||
 | 
			
		||||
@ -121,8 +121,6 @@ class CategoriesViewBinder implements LoaderManager.LoaderCallbacks<Cursor> {
 | 
			
		||||
            emptyState.setVisibility(View.GONE);
 | 
			
		||||
            categoriesList.setVisibility(View.VISIBLE);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        cursor.close();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user