Fixed clear button clearing all values

This commit is contained in:
ByteHamster 2020-07-13 12:10:00 +02:00
parent 03f2198ed5
commit 655c7a9884
1 changed files with 4 additions and 4 deletions

View File

@ -62,11 +62,11 @@ public abstract class FilterDialog {
} }
RecursiveRadioGroup group = (RecursiveRadioGroup) layout.getChildAt(i); RecursiveRadioGroup group = (RecursiveRadioGroup) layout.getChildAt(i);
if (group.getCheckedButton() != null) { if (group.getCheckedButton() != null) {
String tag = (String) group.getCheckedButton().getTag();
if (tag != null) { // Clear buttons use no tag
filterValues.add((String) group.getCheckedButton().getTag()); filterValues.add((String) group.getCheckedButton().getTag());
} }
} }
if (filterValues.contains(null)) {
filterValues.clear();
} }
updateFilter(filterValues); updateFilter(filterValues);
}); });