mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 09:32:46 +00:00
Dismiss controller via presenter if any
This commit is contained in:
parent
4909bfcc17
commit
7cb664eb14
@ -529,7 +529,11 @@ public enum ViewControllerNavigationPresentation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
open func dismiss(completion: (() -> Void)? = nil) {
|
open func dismiss(completion: (() -> Void)? = nil) {
|
||||||
(self.navigationController as? NavigationController)?.filterController(self, animated: true)
|
if let navigationController = self.navigationController as? NavigationController {
|
||||||
|
navigationController.filterController(self, animated: true)
|
||||||
|
} else {
|
||||||
|
self.presentingViewController?.dismiss(animated: false, completion: nil)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(iOSApplicationExtension 9.0, iOS 9.0, *)
|
@available(iOSApplicationExtension 9.0, iOS 9.0, *)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user