Apply scheduled actions when moving to background

This commit is contained in:
Peter 2019-04-30 20:47:16 +04:00
parent 4109739033
commit f90ecb4fa1
4 changed files with 24 additions and 3 deletions

View file

@ -1154,6 +1154,27 @@ final class SharedApplicationContext {
self.isActiveValue = false
self.isActivePromise.set(false)
self.clearNotificationsManager?.commitNow()
if let navigationController = self.mainWindow.viewController as? NavigationController {
for controller in navigationController.viewControllers {
if let controller = controller as? TabBarController {
for subController in controller.controllers {
subController.forEachController { controller in
if let controller = controller as? UndoOverlayController {
controller.dismissWithCommitAction()
}
return true
}
}
}
}
}
self.mainWindow.forEachViewController { controller in
if let controller = controller as? UndoOverlayController {
controller.dismissWithCommitAction()
}
return true
}
}
func applicationDidEnterBackground(_ application: UIApplication) {

@ -1 +1 @@
Subproject commit 1223538a60cd1bbb4fe45874865a48ce4456abc4
Subproject commit 6d3d242c1a73ed4c11772978799fd5492fc44e77

@ -1 +1 @@
Subproject commit 6f17072cfdd473b4c31659f907e589b9f0ce955b
Subproject commit dc958b6db7368bcba72b90d4a5774fed9d141fb7

@ -1 +1 @@
Subproject commit adf380840c87c0e40d1e4bbca0e85d0d8c8b8cd2
Subproject commit 38e7be59c97922d2d849799a12bc2dd81aca1022