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 hasLoadedOnce: Bool
|
||||||
public var canLoadMore: Bool
|
public var canLoadMore: Bool
|
||||||
public var count: Int32
|
public var count: Int32
|
||||||
|
|
||||||
|
public var waitingCount: Int {
|
||||||
|
return importers.filter { $0.approvedBy == nil }.count
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedPeerInvitationImporters: Codable {
|
final class CachedPeerInvitationImporters: Codable {
|
||||||
@@ -892,6 +896,7 @@ private final class PeerInvitationImportersContextImpl {
|
|||||||
|
|
||||||
var results = self.results
|
var results = self.results
|
||||||
results.removeAll(where: { $0.peer.peerId == peerId })
|
results.removeAll(where: { $0.peer.peerId == peerId })
|
||||||
|
count -= 1
|
||||||
self.results = results
|
self.results = results
|
||||||
self.count = max(0, self.count - 1)
|
self.count = max(0, self.count - 1)
|
||||||
self.updateState()
|
self.updateState()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ func apiUpdatesGroups(_ updates: Api.Updates) -> [Api.Chat] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum ExternalJoiningChatState {
|
public enum ExternalJoiningChatState {
|
||||||
public struct InviteFlags {
|
public struct InviteFlags : Equatable {
|
||||||
public let isChannel: Bool
|
public let isChannel: Bool
|
||||||
public let isBroadcast: Bool
|
public let isBroadcast: Bool
|
||||||
public let isPublic: 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 invite(flags: InviteFlags, title: String, about: String?, photoRepresentation: TelegramMediaImageRepresentation?, participantsCount: Int32, participants: [Peer]?)
|
||||||
|
|
||||||
case alreadyJoined(PeerId)
|
case alreadyJoined(PeerId)
|
||||||
case invalidHash
|
case invalidHash
|
||||||
case peek(PeerId, Int32)
|
case peek(PeerId, Int32)
|
||||||
|
|||||||
Reference in New Issue
Block a user