use the main thread, luke

This commit is contained in:
Saúl Ibarra Corretgé 2017-09-28 14:12:03 +02:00
parent aef73cc85f
commit c0e00dab4c
1 changed files with 6 additions and 2 deletions

View File

@ -93,12 +93,16 @@ class ExtensionDelegate: NSObject, WCSessionDelegate, WKExtensionDelegate {
if conferenceURL != "NULL" {
let room = conferenceURL.components(separatedBy: "/").last
let context = ["room" : room, "roomUrl" : conferenceURL as String!, "skipJoin" : "yes"]
currentController.pushController(withName: "InCallController", context: context)
DispatchQueue.main.async {
currentController.pushController(withName: "InCallController", context: context)
}
}
} else {
// This must be InCallController
if conferenceURL == "NULL" {
WKExtension.shared().visibleInterfaceController?.popToRootController()
DispatchQueue.main.async {
WKExtension.shared().visibleInterfaceController?.popToRootController()
}
}
}
}