mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-03 19:54:31 +00:00
Apply scheduled actions when moving to background
This commit is contained in:
@@ -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) {
|
||||
|
||||
Submodule submodules/Display updated: 1223538a60...6d3d242c1a
Submodule submodules/TelegramCore updated: 6f17072cfd...dc958b6db7
Submodule submodules/TelegramUI updated: adf380840c...38e7be59c9
Reference in New Issue
Block a user