Expand/collapse icon rendering immediately when adding subdeck
Purpose / Description
Expand/collapse icon was not updating immediately after adding a subdeck
Fixes
- Fixes #18278
Approach
Added oldItem.children.isEmpty() == newItem.children.isEmpty() to areContentsTheSame() in DiffUtil.ItemCallback to correctly reflect changes in child deck presence.
How Has This Been Tested?
Emulator
https://github.com/user-attachments/assets/c3780b5f-afef-4f81-a776-0526944cae30
Checklist
Please, go through these checks before submitting the PR.
- [X] 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
- [X] You have performed a self-review of your own code
- [X] 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
https://github.com/user-attachments/assets/88a8f377-5da1-4426-b49d-1811b47d3637
Actually, there is still an issue. If you create the first subdeck or if you delete the last subdeck, you'll end up with decks that are not aligned. This is because, if there is a single subdeck anywhere in the collection, all decks are moved to the right in order to let room for the icon on the left when needed. And in order that even when the icon is not needed, the decks are aligned together
Which means that your state need to record also whether there was a subdeck somewhere in the collection
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically
@gayatriii0803 Eh, can you please let us know whether you plan to update?
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically
Fixed in main