mirror of
https://github.com/hub-team/OnlineChatSdk-SwiftPM.git
synced 2026-04-14 16:53:52 +00:00
update 0.1
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user