ADFA-3235 | Fix checkbox selection bug in project list#1075
ADFA-3235 | Fix checkbox selection bug in project list#1075
Conversation
Prevents unintended selection state changes during RecyclerView scrolling.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughRelease Notes - Fix checkbox selection bug in project listChanges:
Risks & Best Practices Violations:
WalkthroughRefactors checkbox event handling in DeleteProjectListAdapter by replacing setOnCheckedChangeListener with setOnClickListener, moving selection state management logic directly into the click handler instead of relying on the listener callback pattern. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable poems in the walkthrough.Disable the |
Description
Replaced
setOnCheckedChangeListenerwithsetOnClickListenerfor the checkbox inDeleteProjectListAdapter. This resolves an issue where theRecyclerViewview recycling process would programmatically trigger the listener during scrolling, causing projects to be incorrectly selected or deselected. Unused imports were also removed to clean up the file.Details
Logic-related fix to ensure stable selection states when scrolling through the list of projects. No UI layout changes.
Before changes
document_5017221786907969367.mp4
After changes
document_5017221786907969356.mp4
Ticket
ADFA-3235
Observation
Using
setOnClickListenerensures that the selection logic is only triggered by actual physical user interaction. This avoids the unintended behavior ofOnCheckedChangeListener, which fires every time theisCheckedproperty is updated programmatically when binding a recycled view.