mirror of
https://github.com/bitwarden/mobile
synced 2025-12-26 05:03:39 +00:00
wip
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Bit.App.Pages
|
||||
private readonly LoginPageViewModel _vm;
|
||||
private readonly AppOptions _appOptions;
|
||||
|
||||
private bool _appeared;
|
||||
private bool _inputFocused;
|
||||
|
||||
public LoginPage(string email = null, AppOptions appOptions = null)
|
||||
@@ -34,11 +35,6 @@ namespace Bit.App.Pages
|
||||
{
|
||||
ToolbarItems.RemoveAt(0);
|
||||
}
|
||||
if (_appOptions?.ShowAccountSwitcher ?? false)
|
||||
{
|
||||
ToolbarItems.Add(_accountAvatar);
|
||||
ToolbarItems.Remove(_closeItem);
|
||||
}
|
||||
|
||||
_email.ReturnType = ReturnType.Next;
|
||||
_email.ReturnCommand = new Command(() => _masterPassword.Focus());
|
||||
@@ -58,18 +54,24 @@ namespace Bit.App.Pages
|
||||
protected override async void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
_mainContent.Content = _mainLayout;
|
||||
if (_appOptions?.ShowAccountSwitcher ?? false)
|
||||
{
|
||||
_appOptions.ShowAccountSwitcher = false;
|
||||
_vm.AvatarImageSource = await GetAvatarImageSourceAsync();
|
||||
}
|
||||
await _vm.InitAsync();
|
||||
if (!_inputFocused)
|
||||
{
|
||||
RequestFocus(string.IsNullOrWhiteSpace(_vm.Email) ? _email : _masterPassword);
|
||||
_inputFocused = true;
|
||||
}
|
||||
if (_appeared)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_appeared = true;
|
||||
_mainContent.Content = _mainLayout;
|
||||
if (await HasMultipleAccountsAsync())
|
||||
{
|
||||
ToolbarItems.Add(_accountAvatar);
|
||||
ToolbarItems.Remove(_closeItem);
|
||||
_vm.AvatarImageSource = await GetAvatarImageSourceAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private async void LogIn_Clicked(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user