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"),