ADFA-3235 | Fix checkbox selection bug in project list#1075
Conversation
|
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 (2)
📝 Walkthrough
Risks & Best-practice notes:
WalkthroughChanged the projects list to use Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.OpenGrep is compatible with Semgrep configurations. Add an |
app/src/main/java/com/itsaky/androidide/adapters/DeleteProjectListAdapter.kt
Show resolved
Hide resolved
Prevents unintended selection state changes during RecyclerView scrolling.
53d5820 to
55be607
Compare
…selection model improve UX by toggling selection from item click and removing internal selection state
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.