mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 19:30:29 +00:00
Fix passcode crashes
This commit is contained in:
parent
bb9b706c94
commit
772f461352
@ -154,6 +154,13 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||||||
|
|
||||||
private var _displayNode: ASDisplayNode?
|
private var _displayNode: ASDisplayNode?
|
||||||
public var displayNode: ASDisplayNode {
|
public var displayNode: ASDisplayNode {
|
||||||
|
if let value = self._displayNode {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
if !self.isViewLoaded {
|
||||||
|
self.loadView()
|
||||||
|
}
|
||||||
|
|
||||||
return self._displayNode!
|
return self._displayNode!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1082,12 +1082,11 @@ public class Window1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func present(_ controller: ContainableController, on level: PresentationSurfaceLevel, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) {
|
public func present(_ controller: ContainableController, on level: PresentationSurfaceLevel, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) {
|
||||||
if let navigationController = self._rootController as? NavigationController, let controller = controller as? ViewController {
|
if level.rawValue <= 3, let navigationController = self._rootController as? NavigationController, let controller = controller as? ViewController {
|
||||||
navigationController.presentOverlay(controller: controller, inGlobal: false)
|
navigationController.presentOverlay(controller: controller, inGlobal: false)
|
||||||
} else {
|
} else {
|
||||||
assertionFailure()
|
self.presentationContext.present(controller, on: level, blockInteraction: blockInteraction, completion: completion)
|
||||||
}
|
}
|
||||||
//self.presentationContext.present(controller, on: level, blockInteraction: blockInteraction, completion: completion)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func presentInGlobalOverlay(_ controller: ContainableController) {
|
public func presentInGlobalOverlay(_ controller: ContainableController) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user