mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Video call improvements
This commit is contained in:
@@ -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: {})
|
||||
|
||||
Reference in New Issue
Block a user