mirror of
https://github.com/bitwarden/mobile
synced 2025-12-14 23:33:34 +00:00
minor improvemments on autofill-redirect
This commit is contained in:
@@ -81,7 +81,7 @@ namespace Bit.App
|
|||||||
|
|
||||||
public void SetOptions(AppOptions appOptions)
|
public void SetOptions(AppOptions appOptions)
|
||||||
{
|
{
|
||||||
Options = appOptions;
|
Options = appOptions ?? new AppOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Window CreateWindow(IActivationState activationState)
|
protected override Window CreateWindow(IActivationState activationState)
|
||||||
@@ -93,26 +93,26 @@ namespace Bit.App
|
|||||||
{
|
{
|
||||||
return new Window(new NavigationPage()); //No actual page needed. Only used for auto-filling the fields directly (externally)
|
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)));
|
_autofillWindow = new Window(new NavigationPage(new AndroidExtSplashPage(Options)));
|
||||||
CurrentWindow = _autofillWindow;
|
CurrentWindow = _autofillWindow;
|
||||||
return CurrentWindow;
|
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: 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?
|
//TODO: Question: In these scenarios should a new Window be created or can the same one be reused?
|
||||||
CurrentWindow = _mainWindow;
|
CurrentWindow = _mainWindow;
|
||||||
return CurrentWindow;
|
return CurrentWindow;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
_mainWindow = new Window(new NavigationPage(new HomePage(Options)));
|
_mainWindow = new Window(new NavigationPage(new HomePage(Options)));
|
||||||
CurrentWindow = _mainWindow;
|
CurrentWindow = _mainWindow;
|
||||||
return CurrentWindow;
|
return CurrentWindow;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#elif IOS
|
#elif IOS
|
||||||
public new static Page MainPage
|
public new static Page MainPage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public partial class AndroidExtSplashPage : ContentPage
|
|||||||
public AndroidExtSplashPage(AppOptions appOptions)
|
public AndroidExtSplashPage(AppOptions appOptions)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_appOptions = appOptions;
|
_appOptions = appOptions ?? new AppOptions();
|
||||||
_conditionedAwaiterManager = ServiceContainer.Resolve<IConditionedAwaiterManager>();
|
_conditionedAwaiterManager = ServiceContainer.Resolve<IConditionedAwaiterManager>();
|
||||||
_vaultTimeoutService = ServiceContainer.Resolve<IVaultTimeoutService>("vaultTimeoutService");
|
_vaultTimeoutService = ServiceContainer.Resolve<IVaultTimeoutService>("vaultTimeoutService");
|
||||||
_stateService = ServiceContainer.Resolve<IStateService>();
|
_stateService = ServiceContainer.Resolve<IStateService>();
|
||||||
|
|||||||
Reference in New Issue
Block a user