Add custom proximity sensor screen dimming since it's broken on iPhone 14

This commit is contained in:
Ilya Laktyushin
2023-02-02 03:45:49 +04:00
parent 824e887294
commit 275e1da4bb
5 changed files with 35 additions and 11 deletions

View File

@@ -165,9 +165,6 @@ final class AuthorizedApplicationContext {
self.notificationController = NotificationContainerController(context: context)
self.mainWindow.previewThemeAccentColor = presentationData.theme.rootController.navigationBar.accentTextColor
self.mainWindow.previewThemeDarkBlur = presentationData.theme.rootController.keyboardColor == .dark
self.rootController = TelegramRootController(context: context)
self.rootController.globalOverlayControllersUpdated = { [weak self] in
@@ -735,8 +732,6 @@ final class AuthorizedApplicationContext {
|> deliverOnMainQueue).start(next: { [weak self] presentationData in
if let strongSelf = self {
if previousTheme.swap(presentationData.theme) !== presentationData.theme {
strongSelf.mainWindow.previewThemeAccentColor = presentationData.theme.rootController.navigationBar.accentTextColor
strongSelf.mainWindow.previewThemeDarkBlur = presentationData.theme.rootController.keyboardColor == .dark
strongSelf.lockedCoveringView.updateTheme(presentationData.theme)
strongSelf.rootController.updateTheme(NavigationControllerTheme(presentationTheme: presentationData.theme))
}