mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
d0156faede
commit
85fb4c244a
@ -52,7 +52,8 @@ public final class PresentationContext {
|
|||||||
return self.view != nil && self.layout != nil
|
return self.view != nil && self.layout != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
private(set) var controllers: [(ContainableController, PresentationSurfaceLevel)] = []
|
public private(set) var controllers: [(ContainableController, PresentationSurfaceLevel)] = []
|
||||||
|
public var controllersUpdated: ([ContainableController]) -> Void = { _ in }
|
||||||
|
|
||||||
private var presentationDisposables = DisposableSet()
|
private var presentationDisposables = DisposableSet()
|
||||||
|
|
||||||
|
@ -6803,8 +6803,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func themeAndStringsUpdated() {
|
func updateStatusBarPresentation() {
|
||||||
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)
|
if !self.galleryPresentationContext.controllers.isEmpty {
|
||||||
|
self.statusBar.statusBarStyle = .White
|
||||||
|
} else {
|
||||||
switch self.presentationInterfaceState.mode {
|
switch self.presentationInterfaceState.mode {
|
||||||
case let .standard(standardMode):
|
case let .standard(standardMode):
|
||||||
switch standardMode {
|
switch standardMode {
|
||||||
@ -6820,6 +6822,12 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
case .inline:
|
case .inline:
|
||||||
self.statusBar.statusBarStyle = .Ignore
|
self.statusBar.statusBarStyle = .Ignore
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func themeAndStringsUpdated() {
|
||||||
|
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)
|
||||||
|
self.updateStatusBarPresentation()
|
||||||
self.updateNavigationBarPresentation()
|
self.updateNavigationBarPresentation()
|
||||||
self.updateChatPresentationInterfaceState(animated: false, interactive: false, { state in
|
self.updateChatPresentationInterfaceState(animated: false, interactive: false, { state in
|
||||||
var state = state
|
var state = state
|
||||||
@ -7200,6 +7208,12 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
override public func loadDisplayNode() {
|
override public func loadDisplayNode() {
|
||||||
self.loadDisplayNodeImpl()
|
self.loadDisplayNodeImpl()
|
||||||
self.galleryPresentationContext.view = self.view
|
self.galleryPresentationContext.view = self.view
|
||||||
|
self.galleryPresentationContext.controllersUpdated = { [weak self] _ in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.updateStatusBarPresentation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override public func viewWillAppear(_ animated: Bool) {
|
override public func viewWillAppear(_ animated: Bool) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user