From 8d2b9255a6be7c0aeb8cc536b8f934846c719b51 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 8 Jul 2025 18:54:36 +0400 Subject: [PATCH] Cleanup (cherry picked from commit 4902b5fa362d0bb633b98e04b23a32b146d237d4) --- .../TelegramCallsUI/Sources/PresentationCall.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramCallsUI/Sources/PresentationCall.swift b/submodules/TelegramCallsUI/Sources/PresentationCall.swift index fbf1b0646a..51b5870c69 100644 --- a/submodules/TelegramCallsUI/Sources/PresentationCall.swift +++ b/submodules/TelegramCallsUI/Sources/PresentationCall.swift @@ -576,6 +576,10 @@ public final class PresentationCallImpl: PresentationCall { if self.receptionDisposable == nil, case .active = sessionState.state { self.reception = 4 + if self.isOutgoing { + self.callKitIntegration?.reportOutgoingCallConnected(uuid: sessionState.id, at: Date()) + } + var canUpdate = false self.receptionDisposable = (ongoingContext.reception |> delay(1.0, queue: .mainQueue()) @@ -600,6 +604,7 @@ public final class PresentationCallImpl: PresentationCall { self.isVideo = true } let previous = self.sessionState + let previousRemoteVideoState = self.previousRemoteVideoState let previousControl = self.audioSessionControl self.sessionState = sessionState self.callContextState = callContextState @@ -1137,12 +1142,12 @@ public final class PresentationCallImpl: PresentationCall { } else { if let presentationState { self.statePromise.set(presentationState) - self.updateTone(presentationState, callContextState: callContextState, previous: previous) + self.updateTone(presentationState, callContextState: callContextState, previous: previous, previousRemoteVideoState: previousRemoteVideoState) } } } - private func updateTone(_ state: PresentationCallState, callContextState: OngoingCallContextState?, previous: CallSession?) { + private func updateTone(_ state: PresentationCallState, callContextState: OngoingCallContextState?, previous: CallSession?, previousRemoteVideoState: PresentationCallState.RemoteVideoState?) { if self.isMovedToConference { return }