CheckForLockInBackground removed

This commit is contained in:
Kyle Spearrin 2017-12-28 16:48:40 -05:00
parent be65597d57
commit ea7290afab
3 changed files with 2 additions and 7 deletions

View file

@ -6,7 +6,6 @@ namespace Bit.App.Abstractions
{
public interface ILockService
{
bool CheckForLockInBackground { get; set; }
void UpdateLastActivity();
Task<LockType> GetLockTypeAsync(bool forceLock);
Task CheckLockAsync(bool forceLock);

View file

@ -80,9 +80,9 @@ namespace Bit.App
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);
});
}
@ -93,7 +93,6 @@ namespace Bit.App
protected async override void OnStart()
{
// Handle when your app starts
_lockService.CheckForLockInBackground = false;
await _lockService.CheckLockAsync(false);
if(string.IsNullOrWhiteSpace(_options.Uri))
@ -116,7 +115,6 @@ namespace Bit.App
protected override void OnSleep()
{
// Handle when your app sleeps
_lockService.CheckForLockInBackground = true;
Debug.WriteLine("OnSleep");
SetMainPageFromAutofill();
@ -130,7 +128,6 @@ namespace Bit.App
protected async override void OnResume()
{
base.OnResume();
_lockService.CheckForLockInBackground = false;
// workaround for app compat bug
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity

View file

@ -31,7 +31,6 @@ namespace Bit.App.Services
_fingerprint = fingerprint;
}
public bool CheckForLockInBackground { get; set; } = true;
public double CurrentLockTime { get; set; }
public void UpdateLastActivity()