mirror of
https://github.com/bitwarden/mobile.git
synced 2025-01-03 18:17:47 +01:00
prompt fignerprint on resume of lock page
This commit is contained in:
parent
d6fd3edb3c
commit
6f905319c3
@ -184,6 +184,10 @@ namespace Bit.App
|
|||||||
{
|
{
|
||||||
SyncIfNeeded();
|
SyncIfNeeded();
|
||||||
}
|
}
|
||||||
|
if(Current.MainPage is NavigationPage navPage && navPage.CurrentPage is LockPage lockPage)
|
||||||
|
{
|
||||||
|
await lockPage.PromptFingerprintAfterResumeAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetCulture()
|
private void SetCulture()
|
||||||
|
@ -11,6 +11,9 @@ namespace Bit.App.Pages
|
|||||||
private readonly bool _autoPromptFingerprint;
|
private readonly bool _autoPromptFingerprint;
|
||||||
private readonly LockPageViewModel _vm;
|
private readonly LockPageViewModel _vm;
|
||||||
|
|
||||||
|
private bool _promptedAfterResume;
|
||||||
|
private bool _appeared;
|
||||||
|
|
||||||
public LockPage(AppOptions appOptions = null, bool autoPromptFingerprint = true)
|
public LockPage(AppOptions appOptions = null, bool autoPromptFingerprint = true)
|
||||||
{
|
{
|
||||||
_appOptions = appOptions;
|
_appOptions = appOptions;
|
||||||
@ -42,9 +45,24 @@ namespace Bit.App.Pages
|
|||||||
public Entry MasterPasswordEntry { get; set; }
|
public Entry MasterPasswordEntry { get; set; }
|
||||||
public Entry PinEntry { get; set; }
|
public Entry PinEntry { get; set; }
|
||||||
|
|
||||||
|
public async Task PromptFingerprintAfterResumeAsync()
|
||||||
|
{
|
||||||
|
await Task.Delay(500);
|
||||||
|
if(!_promptedAfterResume)
|
||||||
|
{
|
||||||
|
_promptedAfterResume = true;
|
||||||
|
await _vm?.PromptFingerprintAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override async void OnAppearing()
|
protected override async void OnAppearing()
|
||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
|
if(_appeared)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_appeared = true;
|
||||||
await _vm.InitAsync(_autoPromptFingerprint);
|
await _vm.InitAsync(_autoPromptFingerprint);
|
||||||
if(!_vm.FingerprintLock)
|
if(!_vm.FingerprintLock)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user