mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various improvements
This commit is contained in:
@@ -293,6 +293,15 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
self.displayNodeDidLoad()
|
||||
}
|
||||
|
||||
private var didDismiss = false
|
||||
open override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
if !self.didDismiss {
|
||||
self.didDismiss = true
|
||||
self.wasDismissed?()
|
||||
}
|
||||
}
|
||||
|
||||
override open func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
@@ -306,10 +315,8 @@ open class ViewControllerComponentContainer: ViewController {
|
||||
}
|
||||
|
||||
open override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) {
|
||||
let wasDismissed = self.wasDismissed
|
||||
super.dismiss(animated: flag, completion: {
|
||||
completion?()
|
||||
wasDismissed?()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user