Remove PiP button callback

This commit is contained in:
ismailgulek
2021-02-17 16:49:48 +03:00
parent 3b0f664a6c
commit df13ce3da9
+7 -16
View File
@@ -478,8 +478,13 @@ extension CallPresenter: MXKCallViewControllerDelegate {
// wait for the call state changes, will be handled there
return
} else {
dismissCallVC(callVC)
self.presentCallBar(for: callVC, completion: completion)
if callVC.mxCall.isVideoCall {
// go to pip mode here
enterPipCallVC(callVC, completion: completion)
} else {
dismissCallVC(callVC)
self.presentCallBar(for: callVC, completion: completion)
}
}
}
@@ -501,20 +506,6 @@ extension CallPresenter: MXKCallViewControllerDelegate {
presentCallVC(onHoldCallVC)
}
func callViewControllerDidTapPiPButton(_ callViewController: MXKCallViewController!) {
guard let callVC = callViewController as? CallViewController else {
// this call screen is not handled by this service
return
}
// sanity check
// do not enter PiP mode if not a video call
guard callVC.mxCall.isVideoCall else { return }
// go to pip mode here
enterPipCallVC(callVC)
}
}
// MARK: - UIViewControllerTransitioningDelegate