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

Closed
opened 2026-04-23 19:48:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2973
Author: @dinisvieira
Created: 2/1/2024
Status: Merged
Merged: 2/3/2024
Merged by: @dinisvieira

Base: feature/maui-migrationHead: feature/pm-5903-android-account-switcher-visible-no-accounts


📝 Commits (1)

  • 23312d3 PM-5903 Changed App.xaml.cs SetOption to only update the needed properties instead of replacing the existing Options object which would cause the AccountSwitcher button bug

📊 Changes

2 files changed (+22 additions, -4 deletions)

View changed files

📝 src/App/Platforms/Android/MainActivity.cs (+2 -1)
📝 src/Core/App.xaml.cs (+20 -3)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2973 **Author:** [@dinisvieira](https://github.com/dinisvieira) **Created:** 2/1/2024 **Status:** ✅ Merged **Merged:** 2/3/2024 **Merged by:** [@dinisvieira](https://github.com/dinisvieira) **Base:** `feature/maui-migration` ← **Head:** `feature/pm-5903-android-account-switcher-visible-no-accounts` --- ### 📝 Commits (1) - [`23312d3`](https://github.com/bitwarden/android/commit/23312d35d28e63cc4c7a0f306bc0df6afde6f4df) PM-5903 Changed App.xaml.cs SetOption to only update the needed properties instead of replacing the existing Options object which would cause the AccountSwitcher button bug ### 📊 Changes **2 files changed** (+22 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Platforms/Android/MainActivity.cs` (+2 -1) 📝 `src/Core/App.xaml.cs` (+20 -3) </details> ### 📄 Description ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 19:48:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#41013