mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +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) {
|
||||
(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, *)
|
||||
|
Loading…
x
Reference in New Issue
Block a user