update 0.1

This commit is contained in:
bekannax
2021-12-21 23:21:18 +07:00
parent b472359990
commit 7e7014213c

View File

@@ -209,7 +209,7 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
return "{}"
}
public func load(_ id: String, _ domain: String, _ language: String = "", _ clientId: String = "", _ apiToken: String = "", _ showCloseButton: Bool = false) {
public func load(_ id: String, _ domain: String, _ language: String = "", _ clientId: String = "", _ apiToken: String = "", _ showCloseButton: Bool = true) {
if apiToken != "" {
ChatConfig.setApiToken(apiToken)
}
@@ -360,11 +360,15 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
navigationController?.popViewController(animated: true)
}
// webview
open override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
chatView.stopLoading()
callJsDestroy()
chatView = nil
if animated && chatView != nil {
chatView.stopLoading()
callJsDestroy()
chatView = nil
}
}
open func onLinkPressed(url: URL) {