1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

Possible fix for iOS crash after long time idling (#1700)

This commit is contained in:
Federico Maccaroni
2022-01-03 12:46:42 -03:00
committed by GitHub
parent 86397a6f1e
commit 9fdcba386e

View File

@@ -201,8 +201,8 @@ namespace Bit.iOS
public override void DidEnterBackground(UIApplication uiApplication)
{
_storageService.SaveAsync(Constants.LastActiveTimeKey, _deviceActionService.GetActiveTime());
_messagingService.Send("slept");
_storageService?.SaveAsync(Constants.LastActiveTimeKey, _deviceActionService.GetActiveTime());
_messagingService?.Send("slept");
base.DidEnterBackground(uiApplication);
}
@@ -220,7 +220,7 @@ namespace Bit.iOS
public override void WillEnterForeground(UIApplication uiApplication)
{
_messagingService.Send("resumed");
_messagingService?.Send("resumed");
base.WillEnterForeground(uiApplication);
}