Video call improvements

This commit is contained in:
Ali
2020-08-21 21:11:29 +01:00
parent bb974d4cc1
commit bead41710b
35 changed files with 2734 additions and 2545 deletions

View File

@@ -24,7 +24,7 @@ protocol CallControllerNodeProtocol: class {
var acceptCall: (() -> Void)? { get set }
var endCall: (() -> Void)? { get set }
var back: (() -> Void)? { get set }
var presentCallRating: ((CallId) -> Void)? { get set }
var presentCallRating: ((CallId, Bool) -> Void)? { get set }
var present: ((ViewController) -> Void)? { get set }
var callEnded: ((Bool) -> Void)? { get set }
var dismissedInteractively: (() -> Void)? { get set }
@@ -230,13 +230,13 @@ public final class CallController: ViewController {
let _ = self?.dismiss()
}
self.controllerNode.presentCallRating = { [weak self] callId in
self.controllerNode.presentCallRating = { [weak self] callId, isVideo in
if let strongSelf = self, !strongSelf.presentedCallRating {
strongSelf.presentedCallRating = true
Queue.mainQueue().after(0.5, {
let window = strongSelf.window
let controller = callRatingController(sharedContext: strongSelf.sharedContext, account: strongSelf.account, callId: callId, userInitiated: false, present: { c, a in
let controller = callRatingController(sharedContext: strongSelf.sharedContext, account: strongSelf.account, callId: callId, userInitiated: false, isVideo: isVideo, present: { c, a in
if let window = window {
c.presentationArguments = a
window.present(c, on: .root, blockInteraction: false, completion: {})