[PR #2973] [PM-5903] Fix Account Switcher visible on Android when no Accounts are logged in #3923

Closed
opened 2025-11-26 23:38:37 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/2973

State: closed
Merged: Yes


Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix Account Switcher visible on Android when no Accounts are logged in.
This is happening because on Android App.xaml.cs.SetOptions() can get called after App.xaml.cs already has Options set. In this scenario it would get replaced and specifically the property HideAccountSwitcher will have an incorrect value of false.

Code changes

  • App.xaml.cs: Update the SetOptions() method to only update the properties that we need from Android instead of replacing the entire object. Also added some comments and changed the method name to SetAndroidOptions() to make it more clear.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
**Original Pull Request:** https://github.com/bitwarden/android/pull/2973 **State:** closed **Merged:** Yes --- ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective Fix Account Switcher visible on Android when no Accounts are logged in. This is happening because on Android `App.xaml.cs.SetOptions()` can get called after `App.xaml.cs` already has Options set. In this scenario it would get replaced and specifically the property `HideAccountSwitcher` will have an incorrect value of `false`. ## Code changes * **App.xaml.cs:** Update the `SetOptions()` method to only update the properties that we need from Android instead of replacing the entire object. Also added some comments and changed the method name to `SetAndroidOptions()` to make it more clear. ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team
GiteaMirror added the pull-request label 2025-11-26 23:38:37 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3923