Use bulk operation instead of iteration
This commit is contained in:
parent
d7e1b0f977
commit
e02baebf02
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue