mirror of
https://github.com/hub-team/OnlineChatSdk-SwiftPM.git
synced 2026-04-14 16:53:52 +00:00
bugfix
This commit is contained in:
@@ -45,8 +45,11 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
|
|||||||
config.preferences = preferences
|
config.preferences = preferences
|
||||||
|
|
||||||
|
|
||||||
|
var frame = UIScreen.main.bounds
|
||||||
self.chatView = WKWebView(frame: (self.parent?.view.bounds)!, configuration: config)
|
if self.parent != nil && self.parent?.view != nil && self.parent?.view.bounds != nil {
|
||||||
|
frame = (self.parent?.view.bounds)!
|
||||||
|
}
|
||||||
|
self.chatView = WKWebView(frame: frame, configuration: config)
|
||||||
self.chatView.navigationDelegate = self
|
self.chatView.navigationDelegate = self
|
||||||
self.view = self.chatView
|
self.view = self.chatView
|
||||||
|
|
||||||
@@ -108,6 +111,7 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
|
|||||||
setup["clientId"] = clientId
|
setup["clientId"] = clientId
|
||||||
}
|
}
|
||||||
let surl = "https://admin.verbox.ru/support/chat/\(id)/\(domain)"
|
let surl = "https://admin.verbox.ru/support/chat/\(id)/\(domain)"
|
||||||
|
// print("tetttt : \(surl)")
|
||||||
var url = URL(string: surl)
|
var url = URL(string: surl)
|
||||||
if !setup.isEmpty {
|
if !setup.isEmpty {
|
||||||
var urlComponents = URLComponents(url: url!, resolvingAgainstBaseURL: false)
|
var urlComponents = URLComponents(url: url!, resolvingAgainstBaseURL: false)
|
||||||
|
|||||||
Reference in New Issue
Block a user