From 4b4757d0e52c9dc14c1b0325d11c8e4bb6534171 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 24 Jun 2019 17:02:05 -0400 Subject: [PATCH] ios resumed --- src/App/App.xaml.cs | 15 ++++++++++----- src/iOS/AppDelegate.cs | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index 0b9f17146..f2941019d 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -114,7 +114,7 @@ namespace Bit.App { if(Device.RuntimePlatform == Device.iOS) { - SyncIfNeeded(); + ResumedAsync(); } } else if(message.Command == "migrated") @@ -179,13 +179,18 @@ namespace Bit.App protected async override void OnResume() { System.Diagnostics.Debug.WriteLine("XF App: OnResume"); + if(Device.RuntimePlatform == Device.Android) + { + ResumedAsync(); + } + } + + private async void ResumedAsync() + { _messagingService.Send("cancelLockTimer"); await ClearCacheIfNeededAsync(); Prime(); - if(Device.RuntimePlatform == Device.Android) - { - SyncIfNeeded(); - } + SyncIfNeeded(); if(Current.MainPage is NavigationPage navPage && navPage.CurrentPage is LockPage lockPage) { await lockPage.PromptFingerprintAfterResumeAsync(); diff --git a/src/iOS/AppDelegate.cs b/src/iOS/AppDelegate.cs index 5de874d1b..563a68fa5 100644 --- a/src/iOS/AppDelegate.cs +++ b/src/iOS/AppDelegate.cs @@ -146,7 +146,7 @@ namespace Bit.iOS public override void WillEnterForeground(UIApplication uiApplication) { - _messagingService.Send("Resumed"); + _messagingService.Send("resumed"); base.WillEnterForeground(uiApplication); } @@ -194,7 +194,7 @@ namespace Bit.iOS _pushHandler = new iOSPushNotificationHandler( ServiceContainer.Resolve("pushNotificationListenerService")); _nfcDelegate = new NFCReaderDelegate((success, message) => - _messagingService.Send("GotYubiKeyOTP", message)); + _messagingService.Send("gotYubiKeyOTP", message)); var crashManagerDelegate = new HockeyAppCrashManagerDelegate( ServiceContainer.Resolve("appIdService"),