This commit is contained in:
overtake
2017-06-06 16:21:25 +03:00
parent 7f96bd3f18
commit c2fbbfb93c
3 changed files with 6 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ public func channelAdmins(account: Account, peerId: PeerId) -> Signal<[RenderedC
var items: [RenderedChannelParticipant] = []
var peers: [PeerId: Peer] = [:]
var status:[PeerId: Peer]
for user in users {
let peer = TelegramUser(user: user)
peers[peer.id] = peer
@@ -27,7 +28,7 @@ public func channelAdmins(account: Account, peerId: PeerId) -> Signal<[RenderedC
for participant in CachedChannelParticipants(apiParticipants: participants).participants {
if let peer = peers[participant.peerId] {
items.append(RenderedChannelParticipant(participant: participant, peer: peer))
items.append(RenderedChannelParticipant(participant: participant, peer: peer, status: <#PeerPresence?#>))
}
}

View File

@@ -32,6 +32,7 @@ public func channelMembers(account: Account, peerId: PeerId, filter: ChannelMemb
case let .channelParticipants(_, participants, users):
var peers: [PeerId: Peer] = [:]
for user in users {
let peer = TelegramUser(user: user)
peers[peer.id] = peer
}

View File

@@ -12,10 +12,11 @@ import Foundation
public struct RenderedChannelParticipant: Equatable {
public let participant: ChannelParticipant
public let peer: Peer
public init(participant: ChannelParticipant, peer: Peer) {
public let status: PeerPresence?
public init(participant: ChannelParticipant, peer: Peer, status: PeerPresence?) {
self.participant = participant
self.peer = peer
self.status = status
}
public static func ==(lhs: RenderedChannelParticipant, rhs: RenderedChannelParticipant) -> Bool {