Skip to content

Commit

Permalink
[NavigationBar] Fix bug where setChecked(false) is called for the p…
Browse files Browse the repository at this point in the history
…reviously checked item even if it's already unchecked

PiperOrigin-RevId: 702083973
  • Loading branch information
imhappi authored and paulfthomas committed Dec 4, 2024
1 parent d68ebbe commit 1696ec3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void setCheckedItem(@NonNull MenuItem checkedItem) {
return;
}
// Unset the previous checked item
if (this.checkedItem != null) {
if (this.checkedItem != null && this.checkedItem.isChecked()) {
this.checkedItem.setChecked(false);
}
checkedItem.setChecked(true);
Expand Down

0 comments on commit 1696ec3

Please sign in to comment.