fix/ADFA-3720 make set text() async#1278
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 (1)
📝 Walkthrough
Risks & best-practice notes:
Recommended testing:
WalkthroughThe ChangesText Field Update Deferral
Sequence Diagram(s)sequenceDiagram
participant Observer
participant UIThread
participant TextInputLayout
Observer->>UIThread: input.post(runnable)
UIThread->>TextInputLayout: runnable -> disableAndRun { setText(value) }
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@templates-impl/src/main/java/com/itsaky/androidide/templates/impl/TemplateWidgetViewProviderImpl.kt`:
- Around line 144-152: The observer's onChanged currently calls disableAndRun {
input.post { input.setText(param.value) } } which re-enables the observer before
setText runs; move the disableAndRun inside the posted Runnable so the
reentrancy guard covers the actual setText call. Locate the observer object
(DefaultObserver<String>) and its onChanged implementation and change the order
so you call input.post { disableAndRun { input.setText(param.value) } },
ensuring programmatic updates don't trigger the TextWatcher to call
param.setValue/resetStartAndEndIcons/constraint checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: feac20e2-868c-4ad8-b21b-26259bbf811b
📒 Files selected for processing (1)
templates-impl/src/main/java/com/itsaky/androidide/templates/impl/TemplateWidgetViewProviderImpl.kt
990e09b to
aea8274
Compare
aea8274 to
7277dfd
Compare
7277dfd to
58937dd
Compare
make settext() async during IME decomposition to address android 12 desync bug