Use bulk operation instead of iteration

This commit is contained in:
Martin Fietz 2018-01-14 18:02:56 +01:00
parent d7e1b0f977
commit e02baebf02
1 changed files with 1 additions and 3 deletions

View File

@ -86,9 +86,7 @@ public class NavListAdapter extends BaseAdapter
private void loadItems() { private void loadItems() {
List<String> newTags = new ArrayList<>(Arrays.asList(MainActivity.NAV_DRAWER_TAGS)); List<String> newTags = new ArrayList<>(Arrays.asList(MainActivity.NAV_DRAWER_TAGS));
List<String> hiddenFragments = UserPreferences.getHiddenDrawerItems(); List<String> hiddenFragments = UserPreferences.getHiddenDrawerItems();
for(String hidden : hiddenFragments) { newTags.removeAll(hiddenFragments);
newTags.remove(hidden);
}
if (newTags.contains(SUBSCRIPTION_LIST_TAG)) { if (newTags.contains(SUBSCRIPTION_LIST_TAG)) {
// we never want SUBSCRIPTION_LIST_TAG to be in 'tags' // we never want SUBSCRIPTION_LIST_TAG to be in 'tags'