mirror of
https://github.com/bitwarden/mobile
synced 2026-01-10 20:43:41 +00:00
Merge branch 'feature/maui-migration' into feature/maui-migration-passkeys
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
x:DataType="pages:HomeViewModel"
|
||||
HideSoftInputOnTapped="True"
|
||||
x:Name="_page"
|
||||
Loaded="HomePage_Loaded"
|
||||
Title="{Binding PageTitle}">
|
||||
<ContentPage.BindingContext>
|
||||
<pages:HomeViewModel />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Bit.App.Models;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Models;
|
||||
using Bit.App.Utilities;
|
||||
using Bit.Core.Abstractions;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.Maui.Platform;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
@@ -44,6 +44,21 @@ namespace Bit.App.Pages
|
||||
}
|
||||
}
|
||||
|
||||
public bool PerformNavigationOnAccountChangedOnLoad { get; internal set; }
|
||||
|
||||
void HomePage_Loaded(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
#if ANDROID
|
||||
// WORKAROUND: This is needed to fix the navigation when coming back from autofill when Accessibility Services is enabled
|
||||
// See App.xaml.cs -> CreateWindow(...) for more info.
|
||||
if (PerformNavigationOnAccountChangedOnLoad && ServiceContainer.TryResolve<IAccountsManager>(out var accountsManager))
|
||||
{
|
||||
PerformNavigationOnAccountChangedOnLoad = false;
|
||||
accountsManager.NavigateOnAccountChangeAsync().FireAndForget();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public async Task DismissRegisterPageAndLogInAsync(string email)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
|
||||
@@ -41,11 +41,11 @@ namespace Bit.App.Pages
|
||||
|
||||
private async Task GoToImportItemsAsync()
|
||||
{
|
||||
var webVaultUrl = _environmentService.GetWebVaultUrl();
|
||||
var body = string.Format(AppResources.YouCanImportDataToYourVaultOnX, webVaultUrl);
|
||||
var toolsImportUrl = string.Format(ExternalLinksConstants.WEB_VAULT_TOOLS_IMPORT_FORMAT, _environmentService.GetWebVaultUrl());
|
||||
var body = string.Format(AppResources.YouCanImportDataToYourVaultOnX, toolsImportUrl);
|
||||
if (await _platformUtilsService.ShowDialogAsync(body, AppResources.ContinueToWebApp, AppResources.Continue, AppResources.Cancel))
|
||||
{
|
||||
_platformUtilsService.LaunchUri(webVaultUrl);
|
||||
_platformUtilsService.LaunchUri(toolsImportUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user