From 834fc542dda17f86ad42ccfdd0b2e0a1b30eb230 Mon Sep 17 00:00:00 2001 From: RichyHBM Date: Sat, 1 Jun 2019 22:03:07 +0100 Subject: [PATCH] Fix all tags only selecting visible tags --- .../shadowice/flocke/andotp/Activities/MainActivity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java b/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java index 38f822b2..0046643b 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java @@ -591,10 +591,13 @@ public class MainActivity extends BaseActivity settings.setAllTagsToggle(checkedTextView.isChecked()); for(int i = 0; i < tagsDrawerListView.getChildCount(); i++) { - CheckedTextView childCheckBox = (CheckedTextView)tagsDrawerListView.getChildAt(i); + CheckedTextView childCheckBox = (CheckedTextView) tagsDrawerListView.getChildAt(i); childCheckBox.setChecked(checkedTextView.isChecked()); - tagsDrawerAdapter.setTagState(childCheckBox.getText().toString(), childCheckBox.isChecked()); - settings.setTagToggle(childCheckBox.getText().toString(), childCheckBox.isChecked()); + } + + for (String tag: tagsDrawerAdapter.getTags()) { + tagsDrawerAdapter.setTagState(tag, checkedTextView.isChecked()); + settings.setTagToggle(tag, checkedTextView.isChecked()); } if(checkedTextView.isChecked()) {