mirror of
https://github.com/bitwarden/mobile.git
synced 2025-02-13 00:41:25 +01:00
CheckForLockInBackground removed
This commit is contained in:
parent
be65597d57
commit
ea7290afab
@ -6,7 +6,6 @@ namespace Bit.App.Abstractions
|
|||||||
{
|
{
|
||||||
public interface ILockService
|
public interface ILockService
|
||||||
{
|
{
|
||||||
bool CheckForLockInBackground { get; set; }
|
|
||||||
void UpdateLastActivity();
|
void UpdateLastActivity();
|
||||||
Task<LockType> GetLockTypeAsync(bool forceLock);
|
Task<LockType> GetLockTypeAsync(bool forceLock);
|
||||||
Task CheckLockAsync(bool forceLock);
|
Task CheckLockAsync(bool forceLock);
|
||||||
|
@ -80,9 +80,9 @@ namespace Bit.App
|
|||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS)
|
if(Device.RuntimePlatform == Device.iOS)
|
||||||
{
|
{
|
||||||
MessagingCenter.Subscribe<Application, bool>(Current, "Resumed", async (sender, args) =>
|
MessagingCenter.Subscribe<Application, bool>(Current, "Resumed", async (sender, forceLock) =>
|
||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(async () => await _lockService.CheckLockAsync(args));
|
Device.BeginInvokeOnMainThread(async () => await _lockService.CheckLockAsync(forceLock));
|
||||||
await Task.Run(() => FullSyncAsync()).ConfigureAwait(false);
|
await Task.Run(() => FullSyncAsync()).ConfigureAwait(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -93,7 +93,6 @@ namespace Bit.App
|
|||||||
protected async override void OnStart()
|
protected async override void OnStart()
|
||||||
{
|
{
|
||||||
// Handle when your app starts
|
// Handle when your app starts
|
||||||
_lockService.CheckForLockInBackground = false;
|
|
||||||
await _lockService.CheckLockAsync(false);
|
await _lockService.CheckLockAsync(false);
|
||||||
|
|
||||||
if(string.IsNullOrWhiteSpace(_options.Uri))
|
if(string.IsNullOrWhiteSpace(_options.Uri))
|
||||||
@ -116,7 +115,6 @@ namespace Bit.App
|
|||||||
protected override void OnSleep()
|
protected override void OnSleep()
|
||||||
{
|
{
|
||||||
// Handle when your app sleeps
|
// Handle when your app sleeps
|
||||||
_lockService.CheckForLockInBackground = true;
|
|
||||||
Debug.WriteLine("OnSleep");
|
Debug.WriteLine("OnSleep");
|
||||||
|
|
||||||
SetMainPageFromAutofill();
|
SetMainPageFromAutofill();
|
||||||
@ -130,7 +128,6 @@ namespace Bit.App
|
|||||||
protected async override void OnResume()
|
protected async override void OnResume()
|
||||||
{
|
{
|
||||||
base.OnResume();
|
base.OnResume();
|
||||||
_lockService.CheckForLockInBackground = false;
|
|
||||||
|
|
||||||
// workaround for app compat bug
|
// workaround for app compat bug
|
||||||
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
||||||
|
@ -31,7 +31,6 @@ namespace Bit.App.Services
|
|||||||
_fingerprint = fingerprint;
|
_fingerprint = fingerprint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CheckForLockInBackground { get; set; } = true;
|
|
||||||
public double CurrentLockTime { get; set; }
|
public double CurrentLockTime { get; set; }
|
||||||
|
|
||||||
public void UpdateLastActivity()
|
public void UpdateLastActivity()
|
||||||
|
Loading…
Reference in New Issue
Block a user