Update API [skip ci]

This commit is contained in:
Ilya Laktyushin
2024-12-26 07:27:14 +04:00
parent 6605f113e5
commit 6e850130fd
122 changed files with 2689 additions and 1770 deletions

View File

@@ -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)