mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
01d50f1e0b
@ -699,7 +699,7 @@ private func binaryInsertionIndex(_ inputArr: [GroupCallParticipantsContext.Part
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class GroupCallParticipantsContext {
|
public final class GroupCallParticipantsContext {
|
||||||
public struct Participant: Equatable {
|
public struct Participant: Equatable, CustomStringConvertible {
|
||||||
public struct MuteState: Equatable {
|
public struct MuteState: Equatable {
|
||||||
public var canUnmute: Bool
|
public var canUnmute: Bool
|
||||||
public var mutedByYou: Bool
|
public var mutedByYou: Bool
|
||||||
@ -748,6 +748,10 @@ public final class GroupCallParticipantsContext {
|
|||||||
self.about = about
|
self.about = about
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public var description: String {
|
||||||
|
return "Participant(peer: \(peer.id): \(peer.debugDisplayTitle), ssrc: \(String(describing: self.ssrc))"
|
||||||
|
}
|
||||||
|
|
||||||
public mutating func mergeActivity(from other: Participant, mergeActivityTimestamp: Bool) {
|
public mutating func mergeActivity(from other: Participant, mergeActivityTimestamp: Bool) {
|
||||||
self.activityRank = other.activityRank
|
self.activityRank = other.activityRank
|
||||||
if mergeActivityTimestamp {
|
if mergeActivityTimestamp {
|
||||||
@ -1312,6 +1316,8 @@ public final class GroupCallParticipantsContext {
|
|||||||
|
|
||||||
let ssrcs = self.missingSsrcs
|
let ssrcs = self.missingSsrcs
|
||||||
|
|
||||||
|
Logger.shared.log("GroupCallParticipantsContext", "will request ssrcs=\(ssrcs)")
|
||||||
|
|
||||||
self.disposable.set((getGroupCallParticipants(account: self.account, callId: self.id, accessHash: self.accessHash, offset: "", ssrcs: Array(ssrcs), limit: 100, sortAscending: true)
|
self.disposable.set((getGroupCallParticipants(account: self.account, callId: self.id, accessHash: self.accessHash, offset: "", ssrcs: Array(ssrcs), limit: 100, sortAscending: true)
|
||||||
|> deliverOnMainQueue).start(next: { [weak self] state in
|
|> deliverOnMainQueue).start(next: { [weak self] state in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
@ -1321,6 +1327,8 @@ public final class GroupCallParticipantsContext {
|
|||||||
|
|
||||||
strongSelf.missingSsrcs.subtract(ssrcs)
|
strongSelf.missingSsrcs.subtract(ssrcs)
|
||||||
|
|
||||||
|
Logger.shared.log("GroupCallParticipantsContext", "did receive response for ssrcs=\(ssrcs), \(state.participants)")
|
||||||
|
|
||||||
var updatedState = strongSelf.stateValue.state
|
var updatedState = strongSelf.stateValue.state
|
||||||
|
|
||||||
updatedState.participants = mergeAndSortParticipants(current: updatedState.participants, with: state.participants, sortAscending: updatedState.sortAscending)
|
updatedState.participants = mergeAndSortParticipants(current: updatedState.participants, with: state.participants, sortAscending: updatedState.sortAscending)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"app": "7.6",
|
"app": "7.6.1",
|
||||||
"bazel": "4.0.0",
|
"bazel": "4.0.0",
|
||||||
"xcode": "12.4"
|
"xcode": "12.4"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user