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() {
List<String> newTags = new ArrayList<>(Arrays.asList(MainActivity.NAV_DRAWER_TAGS));
List<String> hiddenFragments = UserPreferences.getHiddenDrawerItems();
for(String hidden : hiddenFragments) {
newTags.remove(hidden);
}
newTags.removeAll(hiddenFragments);
if (newTags.contains(SUBSCRIPTION_LIST_TAG)) {
// we never want SUBSCRIPTION_LIST_TAG to be in 'tags'