Make things optional

This commit is contained in:
Isaac 2025-01-29 19:26:40 +04:00
parent 60963c1995
commit 6882d53963
2 changed files with 4 additions and 8 deletions

View File

@ -399,8 +399,10 @@ public final class PresentationCallImpl: PresentationCall {
if let data = context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_call_device"] {
self.sharedAudioContext = nil
} else {
} else if context.sharedContext.immediateExperimentalUISettings.conferenceCalls {
self.sharedAudioContext = SharedCallAudioContext(audioSession: audioSession, callKitIntegration: callKitIntegration)
} else {
self.sharedAudioContext = nil
}
if let _ = self.sharedAudioContext {

View File

@ -7142,13 +7142,7 @@ public func shouldUseV2VideoChatImpl(context: AccountContext) -> Bool {
}
public func makeVoiceChatControllerInitialData(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall) -> Signal<Any, NoError> {
let useV2 = shouldUseV2VideoChatImpl(context: accountContext)
if useV2 {
return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any }
} else {
return .single(Void())
}
return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any }
}
public func makeVoiceChatController(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall, initialData: Any, sourceCallController: CallController?) -> VoiceChatController {