mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various improvements
This commit is contained in:
@@ -230,6 +230,9 @@ public protocol CustomViewControllerNavigationDataSummary: AnyObject {
|
||||
|
||||
private var navigationBarOrigin: CGFloat = 0.0
|
||||
|
||||
public var modalTopEdgeOffset: CGFloat = 0.0
|
||||
open var isMinimized: Bool = false
|
||||
|
||||
open var interactiveNavivationGestureEdgeWidth: InteractiveTransitionGestureRecognizerEdgeWidth? {
|
||||
return nil
|
||||
}
|
||||
@@ -349,6 +352,23 @@ public protocol CustomViewControllerNavigationDataSummary: AnyObject {
|
||||
}
|
||||
}
|
||||
|
||||
public var titleSignal: Signal<String?, NoError> {
|
||||
return Signal { [weak self] subscriber in
|
||||
guard let self else {
|
||||
return EmptyDisposable
|
||||
}
|
||||
subscriber.putNext(self.navigationItem.title)
|
||||
let listenerIndex = self.navigationItem.addSetTitleListener { title, _ in
|
||||
subscriber.putNext(title)
|
||||
}
|
||||
return ActionDisposable { [weak self] in
|
||||
if let self {
|
||||
self.navigationItem.removeSetTitleListener(listenerIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public init(navigationBarPresentationData: NavigationBarPresentationData?) {
|
||||
self.statusBar = StatusBar()
|
||||
if let navigationBarPresentationData = navigationBarPresentationData {
|
||||
|
||||
Reference in New Issue
Block a user