|
@@ -1536,7 +1536,10 @@ extension Nexilis: CallDelegate {
|
|
|
let myData = User.getData(pin: idMe)
|
|
|
let onGoingCC = UserDefaults.standard.string(forKey: "onGoingCC") ?? ""
|
|
|
if myData?.offline_mode == "1" {
|
|
|
- API.terminateCall(sParty: nil)
|
|
|
+ Nexilis.startAudio(nMode: 1, bSpeakerOn: false)
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
|
|
+ API.terminateCall(sParty: nil)
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
let deviceId = message.split(separator: ",")[0]
|
|
@@ -1607,20 +1610,36 @@ extension Nexilis: CallDelegate {
|
|
|
data["isOffline"] = cursorData.string(forColumnIndex: 6)
|
|
|
data["user_type"] = cursorData.string(forColumnIndex: 7)
|
|
|
cursorData.close()
|
|
|
- }
|
|
|
- })
|
|
|
- if data["f_pin"] != nil {
|
|
|
- let videoController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
|
|
|
- videoController.dataPerson.append(data)
|
|
|
- videoController.isInisiator = false
|
|
|
- if !onGoingCC.isEmpty {
|
|
|
- videoController.users.append(User.getData(pin: data["f_pin"]!!)!)
|
|
|
- }
|
|
|
- let navigationController = UINavigationController(rootViewController: videoController)
|
|
|
- navigationController.modalPresentationStyle = .fullScreen
|
|
|
- if !onGoingCC.isEmpty {
|
|
|
- videoController.isAutoAccept = true
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + isShowAlert!, execute: {
|
|
|
+
|
|
|
+ let videoController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
|
|
|
+ videoController.dataPerson.append(data)
|
|
|
+ videoController.isInisiator = false
|
|
|
+ if !onGoingCC.isEmpty {
|
|
|
+ videoController.users.append(User.getData(pin: data["f_pin"]!!)!)
|
|
|
+ }
|
|
|
+ let navigationController = UINavigationController(rootViewController: videoController)
|
|
|
+ navigationController.modalPresentationStyle = .fullScreen
|
|
|
+ if !onGoingCC.isEmpty {
|
|
|
+ videoController.isAutoAccept = true
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + isShowAlert!, execute: {
|
|
|
+ if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
+ let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
+ vc.dismiss(animated: true, completion: {
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
vc.dismiss(animated: true, completion: {
|
|
@@ -1637,26 +1656,9 @@ extension Nexilis: CallDelegate {
|
|
|
} else {
|
|
|
UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
}
|
|
|
- })
|
|
|
- } else {
|
|
|
- if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
- let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
- vc.dismiss(animated: true, completion: {
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
- }
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|