mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 15:53:44 +00:00
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 (#2973)
This commit is contained in:
@@ -85,10 +85,27 @@ namespace Bit.App
|
||||
}
|
||||
}
|
||||
|
||||
//Allows setting Options from MainActivity before base.OnCreate
|
||||
public void SetOptions(AppOptions appOptions)
|
||||
/// <summary>
|
||||
/// Allows setting Options from MainActivity before base.OnCreate
|
||||
/// Note 1: This is only be used by Android due to way it's Lifecycle works
|
||||
/// Note 2: This method does not replace existing Options in App.xaml.cs if it exists already.
|
||||
/// It only updates properties in Options related with Autofill/CreateSend/etc..
|
||||
/// </summary>
|
||||
/// <param name="appOptions">Options created in Android MainActivity.cs</param>
|
||||
public void SetAndroidOptions(AppOptions appOptions)
|
||||
{
|
||||
Options = appOptions ?? new AppOptions();
|
||||
if (Options == null)
|
||||
{
|
||||
Options = appOptions ?? new AppOptions();
|
||||
}
|
||||
else if(appOptions != null)
|
||||
{
|
||||
Options.Uri = appOptions.Uri;
|
||||
Options.MyVaultTile = appOptions.MyVaultTile;
|
||||
Options.GeneratorTile = appOptions.GeneratorTile;
|
||||
Options.FromAutofillFramework = appOptions.FromAutofillFramework;
|
||||
Options.CreateSend = appOptions.CreateSend;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState activationState)
|
||||
|
||||
Reference in New Issue
Block a user