From e906e0ee6ac4b1b77d018695d6768ff98d9d5f2e Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 11 Jul 2019 01:11:47 +0200 Subject: [PATCH] Present update info screen above everything else --- submodules/TelegramUI/TelegramUI/ApplicationContext.swift | 2 +- .../TelegramUI/TelegramUI/PresentationSurfaceLevels.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/submodules/TelegramUI/TelegramUI/ApplicationContext.swift b/submodules/TelegramUI/TelegramUI/ApplicationContext.swift index c43b065bc2..f9a7928f99 100644 --- a/submodules/TelegramUI/TelegramUI/ApplicationContext.swift +++ b/submodules/TelegramUI/TelegramUI/ApplicationContext.swift @@ -522,7 +522,7 @@ final class AuthorizedApplicationContext { strongSelf.currentAppUpdateInfo = appUpdateInfo if let appUpdateInfo = appUpdateInfo { let controller = updateInfoController(context: strongSelf.context, appUpdateInfo: appUpdateInfo) - (strongSelf.rootController.viewControllers.last as? ViewController)?.present(controller, in: .window(.root)) + strongSelf.mainWindow.present(controller, on: .update) } })) diff --git a/submodules/TelegramUI/TelegramUI/PresentationSurfaceLevels.swift b/submodules/TelegramUI/TelegramUI/PresentationSurfaceLevels.swift index db5665f424..186255ed3e 100644 --- a/submodules/TelegramUI/TelegramUI/PresentationSurfaceLevels.swift +++ b/submodules/TelegramUI/TelegramUI/PresentationSurfaceLevels.swift @@ -7,4 +7,5 @@ public extension PresentationSurfaceLevel { static let overlayMedia = PresentationSurfaceLevel(rawValue: 2) static let notifications = PresentationSurfaceLevel(rawValue: 3) static let passcode = PresentationSurfaceLevel(rawValue: 4) + static let update = PresentationSurfaceLevel(rawValue: 5) }