mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Merge branch 'requests' of gitlab.com:peter-iakovlev/telegram-ios into requests
This commit is contained in:
@@ -650,6 +650,10 @@ public struct PeerInvitationImportersState: Equatable {
|
||||
public var hasLoadedOnce: Bool
|
||||
public var canLoadMore: Bool
|
||||
public var count: Int32
|
||||
|
||||
public var waitingCount: Int {
|
||||
return importers.filter { $0.approvedBy == nil }.count
|
||||
}
|
||||
}
|
||||
|
||||
final class CachedPeerInvitationImporters: Codable {
|
||||
@@ -891,7 +895,8 @@ private final class PeerInvitationImportersContextImpl {
|
||||
self.actionDisposables.add(_internal_updateInvitationRequest(account: self.account, peerId: self.peerId, userId: peerId, approve: action == .approve).start())
|
||||
|
||||
var results = self.results
|
||||
results.removeAll(where: { $0.peer.peerId == peerId})
|
||||
results.removeAll(where: { $0.peer.peerId == peerId })
|
||||
count -= 1
|
||||
self.results = results
|
||||
self.count = max(0, self.count - 1)
|
||||
self.updateState()
|
||||
|
||||
@@ -22,7 +22,7 @@ func apiUpdatesGroups(_ updates: Api.Updates) -> [Api.Chat] {
|
||||
}
|
||||
|
||||
public enum ExternalJoiningChatState {
|
||||
public struct InviteFlags {
|
||||
public struct InviteFlags : Equatable {
|
||||
public let isChannel: Bool
|
||||
public let isBroadcast: Bool
|
||||
public let isPublic: Bool
|
||||
@@ -31,7 +31,6 @@ public enum ExternalJoiningChatState {
|
||||
}
|
||||
|
||||
case invite(flags: InviteFlags, title: String, about: String?, photoRepresentation: TelegramMediaImageRepresentation?, participantsCount: Int32, participants: [Peer]?)
|
||||
|
||||
case alreadyJoined(PeerId)
|
||||
case invalidHash
|
||||
case peek(PeerId, Int32)
|
||||
|
||||
Reference in New Issue
Block a user