mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Update API [skip ci]
This commit is contained in:
@@ -62,17 +62,13 @@ final class ContactSelectionControllerNode: ASDisplayNode {
|
||||
self.displayDeviceContacts = displayDeviceContacts
|
||||
self.displayCallIcons = displayCallIcons
|
||||
|
||||
var filters: [ContactListFilter] = [.excludeSelf]
|
||||
if requirePhoneNumbers {
|
||||
filters.append(.excludeWithoutPhoneNumbers)
|
||||
}
|
||||
if case .starsGifting = mode {
|
||||
filters.append(.excludeBots)
|
||||
}
|
||||
self.filters = filters
|
||||
var excludeSelf = true
|
||||
|
||||
let displayTopPeers: ContactListPresentation.TopPeers
|
||||
if case let .starsGifting(birthdays, hasActions) = mode {
|
||||
if case let .starsGifting(birthdays, hasActions, showSelf) = mode {
|
||||
if showSelf {
|
||||
excludeSelf = false
|
||||
}
|
||||
if let birthdays {
|
||||
let today = Calendar(identifier: .gregorian).component(.day, from: Date())
|
||||
var sections: [(String, [EnginePeer.Id], Bool)] = []
|
||||
@@ -108,6 +104,18 @@ final class ContactSelectionControllerNode: ASDisplayNode {
|
||||
displayTopPeers = .none
|
||||
}
|
||||
|
||||
var filters: [ContactListFilter] = []
|
||||
if excludeSelf {
|
||||
filters.append(.excludeSelf)
|
||||
}
|
||||
if requirePhoneNumbers {
|
||||
filters.append(.excludeWithoutPhoneNumbers)
|
||||
}
|
||||
if case .starsGifting = mode {
|
||||
filters.append(.excludeBots)
|
||||
}
|
||||
self.filters = filters
|
||||
|
||||
let presentation: Signal<ContactListPresentation, NoError> = options
|
||||
|> map { options in
|
||||
return .natural(options: options, includeChatList: false, topPeers: displayTopPeers)
|
||||
|
||||
Reference in New Issue
Block a user