Various improvements

This commit is contained in:
Ilya Laktyushin
2025-01-18 13:44:42 +04:00
parent a8fd8c6085
commit ef6c097f6f
57 changed files with 1892 additions and 485 deletions

View File

@@ -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)
}
}