mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -66,6 +66,7 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
public let isVisible: Bool
|
||||
public let theme: PresentationTheme
|
||||
public let strings: PresentationStrings
|
||||
public let dateTimeFormat: PresentationDateTimeFormat
|
||||
public let controller: () -> ViewController?
|
||||
|
||||
public init(
|
||||
@@ -75,6 +76,7 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
isVisible: Bool,
|
||||
theme: PresentationTheme,
|
||||
strings: PresentationStrings,
|
||||
dateTimeFormat: PresentationDateTimeFormat,
|
||||
controller: @escaping () -> ViewController?
|
||||
) {
|
||||
self.statusBarHeight = statusBarHeight
|
||||
@@ -83,6 +85,7 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
self.isVisible = isVisible
|
||||
self.theme = theme
|
||||
self.strings = strings
|
||||
self.dateTimeFormat = dateTimeFormat
|
||||
self.controller = controller
|
||||
}
|
||||
|
||||
@@ -109,6 +112,9 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
if lhs.strings !== rhs.strings {
|
||||
return false
|
||||
}
|
||||
if lhs.dateTimeFormat != rhs.dateTimeFormat {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -149,6 +155,7 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
isVisible: self.currentIsVisible,
|
||||
theme: self.theme ?? self.presentationData.theme,
|
||||
strings: self.presentationData.strings,
|
||||
dateTimeFormat: self.presentationData.dateTimeFormat,
|
||||
controller: { [weak self] in
|
||||
return self?.controller
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user