mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix passport dismissal and inner navigation
This commit is contained in:
@@ -13,9 +13,7 @@ public class FormController<InnerState, InitParams, Node: FormControllerNode<Ini
|
||||
|
||||
private let initParams: InitParams
|
||||
private var presentationData: PresentationData
|
||||
|
||||
private var didPlayPresentationAnimation = false
|
||||
|
||||
|
||||
init(initParams: InitParams, presentationData: PresentationData) {
|
||||
self.initParams = initParams
|
||||
self.presentationData = presentationData
|
||||
@@ -29,21 +27,9 @@ public class FormController<InnerState, InitParams, Node: FormControllerNode<Ini
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override public func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
if !self.didPlayPresentationAnimation {
|
||||
self.didPlayPresentationAnimation = true
|
||||
self.controllerNode.animateIn()
|
||||
}
|
||||
}
|
||||
|
||||
override public func dismiss(completion: (() -> Void)? = nil) {
|
||||
self.controllerNode.view.endEditing(true)
|
||||
self.controllerNode.animateOut(completion: { [weak self] in
|
||||
self?.presentingViewController?.dismiss(animated: false, completion: nil)
|
||||
completion?()
|
||||
})
|
||||
super.dismiss(completion: completion)
|
||||
}
|
||||
|
||||
override public func loadDisplayNode() {
|
||||
|
||||
Reference in New Issue
Block a user