mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
move splash screen logic to OnResignActivation (#1674)
This commit is contained in:
parent
05bcc10277
commit
dddc38ef64
1 changed files with 8 additions and 10 deletions
|
@ -183,17 +183,8 @@ namespace Bit.iOS
|
|||
return base.FinishedLaunching(app, options);
|
||||
}
|
||||
|
||||
public override void DidEnterBackground(UIApplication uiApplication)
|
||||
public override void OnResignActivation(UIApplication uiApplication)
|
||||
{
|
||||
_storageService.SaveAsync(Constants.LastActiveTimeKey, _deviceActionService.GetActiveTime());
|
||||
_messagingService.Send("slept");
|
||||
|
||||
if (UIApplication.SharedApplication.KeyWindow == null)
|
||||
{
|
||||
// Despite IDE warning, KeyWindow is null here during app termination in iOS 15
|
||||
return;
|
||||
}
|
||||
|
||||
var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
||||
{
|
||||
Tag = 4321
|
||||
|
@ -213,6 +204,13 @@ namespace Bit.iOS
|
|||
UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(view);
|
||||
UIApplication.SharedApplication.KeyWindow.EndEditing(true);
|
||||
UIApplication.SharedApplication.SetStatusBarHidden(true, false);
|
||||
base.OnResignActivation(uiApplication);
|
||||
}
|
||||
|
||||
public override void DidEnterBackground(UIApplication uiApplication)
|
||||
{
|
||||
_storageService.SaveAsync(Constants.LastActiveTimeKey, _deviceActionService.GetActiveTime());
|
||||
_messagingService.Send("slept");
|
||||
base.DidEnterBackground(uiApplication);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue