Fix account picker showing two filled radio buttons#5820
Open
CodeSculptor wants to merge 1 commit into
Open
Conversation
The "None" entry was hardcoded as selected, so when an account was also selected (account.isSelected() == true) the radio category rendered with two filled buttons simultaneously. Mark "None" as selected only when no account is currently selected. Same issue in both the AccountSelectionPresenter dialog and the Settings account picker. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Owner
|
Thanks for the pr. Strange, but I don't observe the bug. Could you post the screenshot of the bug? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The account picker (
AccountSelectionPresenter) and the Accounts settings dialog (AccountSettingsPresenter) both render with two filled radio buttons when an account is signed in: the hard-codedNoneentry plus the currently-selected account.The cause is the same in both files:
Noneis added to the radio category withisSelected = truehard-coded, while the account loop below also marks the active account as selected.appendRadioCategorythen renders both as filled.Fix
Mark
Noneas selected only when no account is currently selected:```java
}, mSignInService.getSelectedAccount() == null
```
Two-line change in two files. No behaviour change when zero accounts are signed in (still
Noneselected); fixes the visual when one or more accounts are signed in.Repro
Noneand the active account both render as filled.🤖 Generated with Claude Code