mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Make things optional
This commit is contained in:
parent
60963c1995
commit
6882d53963
@ -399,8 +399,10 @@ public final class PresentationCallImpl: PresentationCall {
|
|||||||
|
|
||||||
if let data = context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_call_device"] {
|
if let data = context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_call_device"] {
|
||||||
self.sharedAudioContext = nil
|
self.sharedAudioContext = nil
|
||||||
} else {
|
} else if context.sharedContext.immediateExperimentalUISettings.conferenceCalls {
|
||||||
self.sharedAudioContext = SharedCallAudioContext(audioSession: audioSession, callKitIntegration: callKitIntegration)
|
self.sharedAudioContext = SharedCallAudioContext(audioSession: audioSession, callKitIntegration: callKitIntegration)
|
||||||
|
} else {
|
||||||
|
self.sharedAudioContext = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if let _ = self.sharedAudioContext {
|
if let _ = self.sharedAudioContext {
|
||||||
|
@ -7142,13 +7142,7 @@ public func shouldUseV2VideoChatImpl(context: AccountContext) -> Bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func makeVoiceChatControllerInitialData(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall) -> Signal<Any, NoError> {
|
public func makeVoiceChatControllerInitialData(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall) -> Signal<Any, NoError> {
|
||||||
let useV2 = shouldUseV2VideoChatImpl(context: accountContext)
|
return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any }
|
||||||
|
|
||||||
if useV2 {
|
|
||||||
return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any }
|
|
||||||
} else {
|
|
||||||
return .single(Void())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func makeVoiceChatController(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall, initialData: Any, sourceCallController: CallController?) -> VoiceChatController {
|
public func makeVoiceChatController(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall, initialData: Any, sourceCallController: CallController?) -> VoiceChatController {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user