mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
only prompt fingerprint if set
This commit is contained in:
parent
54141f77d6
commit
060e1a822f
2 changed files with 22 additions and 15 deletions
|
@ -47,11 +47,14 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
public async Task PromptFingerprintAfterResumeAsync()
|
public async Task PromptFingerprintAfterResumeAsync()
|
||||||
{
|
{
|
||||||
await Task.Delay(500);
|
if(_vm.FingerprintLock)
|
||||||
if(!_promptedAfterResume)
|
|
||||||
{
|
{
|
||||||
_promptedAfterResume = true;
|
await Task.Delay(500);
|
||||||
await _vm?.PromptFingerprintAsync();
|
if(!_promptedAfterResume)
|
||||||
|
{
|
||||||
|
_promptedAfterResume = true;
|
||||||
|
await _vm?.PromptFingerprintAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,19 +250,23 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
public async Task PromptFingerprintAsync()
|
public async Task PromptFingerprintAsync()
|
||||||
{
|
{
|
||||||
|
if(!FingerprintLock)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
var success = await _platformUtilsService.AuthenticateFingerprintAsync(null,
|
var success = await _platformUtilsService.AuthenticateFingerprintAsync(null,
|
||||||
PinLock ? AppResources.PIN : AppResources.MasterPassword, () =>
|
PinLock ? AppResources.PIN : AppResources.MasterPassword, () =>
|
||||||
|
{
|
||||||
|
var page = Page as LockPage;
|
||||||
|
if(PinLock)
|
||||||
{
|
{
|
||||||
var page = Page as LockPage;
|
page.PinEntry.Focus();
|
||||||
if(PinLock)
|
}
|
||||||
{
|
else
|
||||||
page.PinEntry.Focus();
|
{
|
||||||
}
|
page.MasterPasswordEntry.Focus();
|
||||||
else
|
}
|
||||||
{
|
});
|
||||||
page.MasterPasswordEntry.Focus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
_lockService.FingerprintLocked = !success;
|
_lockService.FingerprintLocked = !success;
|
||||||
if(success)
|
if(success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue