1
0
mirror of https://github.com/bitwarden/mobile synced 2025-01-29 17:59:23 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}