mirror of
https://github.com/bitwarden/android.git
synced 2024-12-26 19:08:32 +03:00
minor improvemments on autofill-redirect
This commit is contained in:
parent
8b3c6ab35f
commit
3c87d4db1c
2 changed files with 10 additions and 10 deletions
|
@ -81,7 +81,7 @@ namespace Bit.App
|
|||
|
||||
public void SetOptions(AppOptions appOptions)
|
||||
{
|
||||
Options = appOptions;
|
||||
Options = appOptions ?? new AppOptions();
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState activationState)
|
||||
|
@ -93,25 +93,25 @@ namespace Bit.App
|
|||
{
|
||||
return new Window(new NavigationPage()); //No actual page needed. Only used for auto-filling the fields directly (externally)
|
||||
}
|
||||
else if (Options.FromAutofillFramework || Options.Uri != null || Options.OtpData != null || Options.CreateSend != null) //"Internal" Autofill and Uri/Otp/CreateSend
|
||||
|
||||
if (Options != null && (Options.FromAutofillFramework || Options.Uri != null || Options.OtpData != null || Options.CreateSend != null)) //"Internal" Autofill and Uri/Otp/CreateSend
|
||||
{
|
||||
_autofillWindow = new Window(new NavigationPage(new AndroidExtSplashPage(Options)));
|
||||
CurrentWindow = _autofillWindow;
|
||||
return CurrentWindow;
|
||||
}
|
||||
else if(CurrentWindow != null)
|
||||
|
||||
if(CurrentWindow != null)
|
||||
{
|
||||
//TODO: This likely crashes if we try to have two apps side-by-side on Android
|
||||
//TODO: Question: In these scenarios should a new Window be created or can the same one be reused?
|
||||
CurrentWindow = _mainWindow;
|
||||
return CurrentWindow;
|
||||
}
|
||||
else
|
||||
{
|
||||
_mainWindow = new Window(new NavigationPage(new HomePage(Options)));
|
||||
CurrentWindow = _mainWindow;
|
||||
return CurrentWindow;
|
||||
}
|
||||
|
||||
_mainWindow = new Window(new NavigationPage(new HomePage(Options)));
|
||||
CurrentWindow = _mainWindow;
|
||||
return CurrentWindow;
|
||||
}
|
||||
#elif IOS
|
||||
public new static Page MainPage
|
||||
|
|
|
@ -16,7 +16,7 @@ public partial class AndroidExtSplashPage : ContentPage
|
|||
public AndroidExtSplashPage(AppOptions appOptions)
|
||||
{
|
||||
InitializeComponent();
|
||||
_appOptions = appOptions;
|
||||
_appOptions = appOptions ?? new AppOptions();
|
||||
_conditionedAwaiterManager = ServiceContainer.Resolve<IConditionedAwaiterManager>();
|
||||
_vaultTimeoutService = ServiceContainer.Resolve<IVaultTimeoutService>("vaultTimeoutService");
|
||||
_stateService = ServiceContainer.Resolve<IStateService>();
|
||||
|
|
Loading…
Reference in a new issue