From e222d67c9acd5c7c6ece067ab49d6fcf62e7d85a Mon Sep 17 00:00:00 2001 From: overtake Date: Tue, 25 May 2021 15:19:34 +0300 Subject: [PATCH] fix isvideoavailable --- .../TelegramCore/Sources/GroupCalls.swift | 26 ++++++++++--------- .../Sources/OngoingCallThreadLocalContext.mm | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/submodules/TelegramCore/Sources/GroupCalls.swift b/submodules/TelegramCore/Sources/GroupCalls.swift index 8cd8993402..f5751171ce 100644 --- a/submodules/TelegramCore/Sources/GroupCalls.swift +++ b/submodules/TelegramCore/Sources/GroupCalls.swift @@ -383,19 +383,21 @@ public enum GetGroupCallParticipantsError { public func getGroupCallParticipants(account: Account, callId: Int64, accessHash: Int64, offset: String, ssrcs: [UInt32], limit: Int32, sortAscending: Bool?) -> Signal { let sortAscendingValue: Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?, Bool), GetGroupCallParticipantsError> - if let sortAscending = sortAscending { - sortAscendingValue = .single((sortAscending, nil, false, nil, false)) - } else { - sortAscendingValue = getCurrentGroupCall(account: account, callId: callId, accessHash: accessHash) - |> mapError { _ -> GetGroupCallParticipantsError in - return .generic - } - |> mapToSignal { result -> Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?, Bool), GetGroupCallParticipantsError> in - guard let result = result else { - return .fail(.generic) - } - return .single((result.info.sortAscending, result.info.scheduleTimestamp, result.info.subscribedToScheduled, result.info.defaultParticipantsAreMuted, result.info.isVideoEnabled)) +// if let sortAscending = sortAscending { +// sortAscendingValue = .single((sortAscending, nil, false, nil, false)) +// } else { +// +// } + + sortAscendingValue = getCurrentGroupCall(account: account, callId: callId, accessHash: accessHash) + |> mapError { _ -> GetGroupCallParticipantsError in + return .generic + } + |> mapToSignal { result -> Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?, Bool), GetGroupCallParticipantsError> in + guard let result = result else { + return .fail(.generic) } + return .single((sortAscending ?? result.info.sortAscending, result.info.scheduleTimestamp, result.info.subscribedToScheduled, result.info.defaultParticipantsAreMuted, result.info.isVideoEnabled)) } return combineLatest( diff --git a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm index b739e28fa2..b3af12ba4b 100644 --- a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm +++ b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm @@ -14,6 +14,7 @@ #ifndef WEBRTC_IOS #import "platform/darwin/VideoMetalViewMac.h" #import "platform/darwin/GLVideoViewMac.h" +#import "platform/darwin/VideoSampleBufferViewMac.h" #define UIViewContentModeScaleAspectFill kCAGravityResizeAspectFill #define UIViewContentModeScaleAspect kCAGravityResizeAspect