mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Stories
This commit is contained in:
parent
16cd9b3c29
commit
11ed074079
7 changed files with 30 additions and 7 deletions
|
|
@ -24,6 +24,7 @@ private extension PresentationGroupCallState {
|
|||
return PresentationGroupCallState(
|
||||
myPeerId: myPeerId,
|
||||
networkState: .connecting,
|
||||
connectionMode: .rtc,
|
||||
canManageCall: false,
|
||||
adminIds: Set(),
|
||||
muteState: GroupCallParticipantsContext.Participant.MuteState(canUnmute: true, mutedByYou: false),
|
||||
|
|
@ -76,7 +77,7 @@ extension CurrentImpl {
|
|||
case let .call(callContext):
|
||||
return callContext.networkState
|
||||
case .mediaStream, .externalMediaStream:
|
||||
return .single(OngoingGroupCallContext.NetworkState(isConnected: true, isTransitioningFromBroadcastToRtc: false))
|
||||
return .single(OngoingGroupCallContext.NetworkState(isConnected: true, isTransitioningFromBroadcastToRtc: false, isBroadcast: true))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2148,10 +2149,19 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||
} else {
|
||||
mappedState = .connecting
|
||||
}
|
||||
let mappedMode: PresentationGroupCallState.ConnectionMode
|
||||
if state.isBroadcast {
|
||||
mappedMode = .stream
|
||||
} else {
|
||||
mappedMode = .rtc
|
||||
}
|
||||
|
||||
let wasConnecting = self.stateValue.networkState == .connecting
|
||||
if self.stateValue.networkState != mappedState {
|
||||
self.stateValue.networkState = mappedState
|
||||
if self.stateValue.networkState != mappedState || self.stateValue.connectionMode != mappedMode {
|
||||
var stateValue = self.stateValue
|
||||
stateValue.networkState = mappedState
|
||||
stateValue.connectionMode = mappedMode
|
||||
self.stateValue = stateValue
|
||||
}
|
||||
let isConnecting = mappedState == .connecting
|
||||
|
||||
|
|
|
|||
|
|
@ -1204,6 +1204,7 @@ final class VideoChatScreenComponent: Component {
|
|||
let callState = PresentationGroupCallState(
|
||||
myPeerId: accountPeerId,
|
||||
networkState: mappedNetworkState,
|
||||
connectionMode: .rtc,
|
||||
canManageCall: false,
|
||||
adminIds: Set([accountPeerId, conferenceSourcePeerId]),
|
||||
muteState: isMuted ? GroupCallParticipantsContext.Participant.MuteState(canUnmute: true, mutedByYou: true) : nil,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue