mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Various improvements
This commit is contained in:
@@ -619,14 +619,18 @@ open class LegacyController: ViewController, PresentableController {
|
||||
override open func dismiss(completion: (() -> Void)? = nil) {
|
||||
self.view.endEditing(true)
|
||||
switch self.presentation {
|
||||
case .modal:
|
||||
self.controllerNode.animateModalOut { [weak self] in
|
||||
self?.presentingViewController?.dismiss(animated: false, completion: completion)
|
||||
}
|
||||
case .custom:
|
||||
case .modal:
|
||||
self.controllerNode.animateModalOut { [weak self] in
|
||||
self?.presentingViewController?.dismiss(animated: false, completion: completion)
|
||||
}
|
||||
case .custom:
|
||||
if let _ = self.navigationController as? NavigationController {
|
||||
super.dismiss(animated: false, completion: completion)
|
||||
} else {
|
||||
self.presentingViewController?.dismiss(animated: false, completion: completion)
|
||||
case .navigation:
|
||||
(self.navigationController as? NavigationController)?.filterController(self, animated: true)
|
||||
}
|
||||
case .navigation:
|
||||
(self.navigationController as? NavigationController)?.filterController(self, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user