mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -1354,10 +1354,24 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
|
||||
public func replaceControllersAndPush(controllers: [UIViewController], controller: ViewController, animated: Bool, options: NavigationAnimationOptions = [], ready: ValuePromise<Bool>? = nil, completion: @escaping () -> Void = {}) {
|
||||
ready?.set(true)
|
||||
var controllers = controllers
|
||||
controllers.append(controller)
|
||||
self.setViewControllers(controllers, animated: animated)
|
||||
completion()
|
||||
let action = { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
var controllers = controllers
|
||||
controllers.append(controller)
|
||||
self.setViewControllers(controllers, animated: animated)
|
||||
completion()
|
||||
}
|
||||
if let rootContainer = self.rootContainer, case let .split(container) = rootContainer, let topController = container.detailControllers.last {
|
||||
if topController.attemptNavigation({
|
||||
action()
|
||||
}) {
|
||||
action()
|
||||
}
|
||||
} else {
|
||||
action()
|
||||
}
|
||||
}
|
||||
|
||||
public func replaceControllers(controllers: [UIViewController], animated: Bool, options: NavigationAnimationOptions = [], ready: ValuePromise<Bool>? = nil, completion: @escaping () -> Void = {}) {
|
||||
|
||||
@@ -1654,7 +1654,7 @@ open class TextNode: ASDisplayNode {
|
||||
return (layout, {
|
||||
node.cachedLayout = layout
|
||||
if updated {
|
||||
if layout.size.width.isZero && layout.size.height.isZero {
|
||||
if layout.size.width.isZero || layout.size.height.isZero {
|
||||
node.contents = nil
|
||||
}
|
||||
node.setNeedsDisplay()
|
||||
|
||||
Reference in New Issue
Block a user