mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 16:53:26 +00:00
[PM-1431] [Defect] [Android] New accounts are not able to log in (#2417)
* [PM-1431] Do not clear Master password if login is ongoing.
This commit is contained in:
@@ -40,6 +40,7 @@ namespace Bit.App.Pages
|
|||||||
private string _masterPassword;
|
private string _masterPassword;
|
||||||
private bool _isEmailEnabled;
|
private bool _isEmailEnabled;
|
||||||
private bool _isKnownDevice;
|
private bool _isKnownDevice;
|
||||||
|
private bool _isExecutingLogin;
|
||||||
|
|
||||||
public LoginPageViewModel()
|
public LoginPageViewModel()
|
||||||
{
|
{
|
||||||
@@ -192,6 +193,7 @@ namespace Bit.App.Pages
|
|||||||
ShowPassword = false;
|
ShowPassword = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_isExecutingLogin = true;
|
||||||
if (checkForExistingAccount)
|
if (checkForExistingAccount)
|
||||||
{
|
{
|
||||||
var userId = await _stateService.GetUserIdAsync(Email);
|
var userId = await _stateService.GetUserIdAsync(Email);
|
||||||
@@ -253,15 +255,22 @@ namespace Bit.App.Pages
|
|||||||
AppResources.AnErrorHasOccurred, AppResources.Ok);
|
AppResources.AnErrorHasOccurred, AppResources.Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_isExecutingLogin = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetPasswordField()
|
public void ResetPasswordField()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (!_isExecutingLogin)
|
||||||
{
|
{
|
||||||
MasterPassword = string.Empty;
|
MasterPassword = string.Empty;
|
||||||
ShowPassword = false;
|
ShowPassword = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LoggerHelper.LogEvenIfCantBeResolved(ex);
|
LoggerHelper.LogEvenIfCantBeResolved(ex);
|
||||||
|
|||||||
Reference in New Issue
Block a user