This commit is contained in:
Andrey Blinov
2020-08-15 01:39:32 +07:00
parent a34a674a29
commit 69c32ea241

View File

@@ -73,8 +73,8 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
return
}
}
UIApplication.shared.openURL(navigationAction.request.url!)
decisionHandler(.cancel)
self.onLinkPressed(url: navigationAction.request.url!)
}
private func getCallJsMethod(_ name: String, params: Array<Any>) -> String {
@@ -228,6 +228,10 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
}
onEvent(name, data!)
}
open func onLinkPressed(url: URL) {
UIApplication.shared.openURL(url)
}
open func playSound(_ systemSoundId: SystemSoundID) {
AudioServicesPlaySystemSound(systemSoundId)