fix: Inconsistent tag checkbox color
Purpose / Description
The problem was that despite the state within CheckBoxTriStates.kt getting updated when the tag list item was clicked (and the icon correctly changing), the drawableState would stay the same. As the button tint is linked to the drawableState, whatever was the current color of the checkbox, it would stay that way despite the icon changing.
The solution was to forcibly refresh the drawableState when the checkbox state is changed indirectly, either when clicking on the tag list item or when a parents tag state changes due to a child tag.
What I couldn't figure out is why the drawableState updates when the checkbox is clicked directly but not when the list item is clicked. The same onClickListener for the checkBoxView and other methods in CheckBoxTriStates.kt are hit in both scenarios so it must be some additional side affect.
Tag Inconsistent Color Fix.webm
Fixes
- Fixes #15196
Checklist
Please, go through these checks before submitting the PR.
- [ ] You have a descriptive commit message with a short title (first line, max 50 chars).
- [ ] You have commented your code, particularly in hard-to-understand areas
- [ ] You have performed a self-review of your own code
- [ ] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [ ] UI Changes: You have tested your change using the Google Accessibility Scanner