Commit f1cb348b authored by Lorenzo Pichilli's avatar Lorenzo Pichilli Committed by GitHub

Merge pull request #119 from benfingo/master

Remove async call in close Swift
parents 07f63a5f cb792115
...@@ -272,27 +272,21 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU ...@@ -272,27 +272,21 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU
weak var weakSelf = self weak var weakSelf = self
// Run later to avoid the "took a long time" log message. if (weakSelf?.responds(to: #selector(getter: self.presentingViewController)))! {
DispatchQueue.main.async(execute: {() -> Void in weakSelf?.presentingViewController?.dismiss(animated: true, completion: {() -> Void in
if (weakSelf?.responds(to: #selector(getter: self.presentingViewController)))! { self.tmpWindow?.windowLevel = 0.0
weakSelf?.presentingViewController?.dismiss(animated: true, completion: {() -> Void in UIApplication.shared.delegate?.window??.makeKeyAndVisible()
self.tmpWindow?.windowLevel = 0.0 })
UIApplication.shared.delegate?.window??.makeKeyAndVisible() }
if (self.navigationDelegate != nil) { else {
self.navigationDelegate?.browserExit(uuid: self.uuid) weakSelf?.parent?.dismiss(animated: true, completion: {() -> Void in
} self.tmpWindow?.windowLevel = 0.0
}) UIApplication.shared.delegate?.window??.makeKeyAndVisible()
} })
else { }
weakSelf?.parent?.dismiss(animated: true, completion: {() -> Void in if (self.navigationDelegate != nil) {
self.tmpWindow?.windowLevel = 0.0 self.navigationDelegate?.browserExit(uuid: self.uuid)
UIApplication.shared.delegate?.window??.makeKeyAndVisible() }
if (self.navigationDelegate != nil) {
self.navigationDelegate?.browserExit(uuid: self.uuid)
}
})
}
})
} }
@objc func goBack() { @objc func goBack() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment