mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add support for multiple users selection in bots peer requests
This commit is contained in:
@@ -108,6 +108,11 @@ final class ContactMultiselectionControllerNode: ASDisplayNode {
|
||||
self.footerPanelNode = FooterPanelNode(theme: self.presentationData.theme, strings: self.presentationData.strings, action: {
|
||||
proceedImpl?()
|
||||
})
|
||||
case .requestedUsersSelection:
|
||||
placeholder = self.presentationData.strings.RequestPeer_SelectUsers_SearchPlaceholder
|
||||
self.footerPanelNode = FooterPanelNode(theme: self.presentationData.theme, strings: self.presentationData.strings, action: {
|
||||
proceedImpl?()
|
||||
})
|
||||
default:
|
||||
placeholder = self.presentationData.strings.Compose_TokenListPlaceholder
|
||||
self.footerPanelNode = nil
|
||||
@@ -149,6 +154,8 @@ final class ContactMultiselectionControllerNode: ASDisplayNode {
|
||||
var displayTopPeers = false
|
||||
if case .premiumGifting = mode {
|
||||
displayTopPeers = true
|
||||
} else if case .requestedUsersSelection = mode {
|
||||
displayTopPeers = true
|
||||
}
|
||||
self.contentNode = .contacts(ContactListNode(context: context, presentation: .single(.natural(options: options, includeChatList: includeChatList, topPeers: displayTopPeers)), filters: filters, selectionState: ContactListNodeGroupSelectionState()))
|
||||
}
|
||||
@@ -233,7 +240,7 @@ final class ContactMultiselectionControllerNode: ASDisplayNode {
|
||||
searchGroups = true
|
||||
searchChannels = true
|
||||
globalSearch = false
|
||||
case .premiumGifting:
|
||||
case .premiumGifting, .requestedUsersSelection:
|
||||
searchChatList = true
|
||||
}
|
||||
let searchResultsNode = ContactListNode(context: context, presentation: .single(.search(signal: searchText.get(), searchChatList: searchChatList, searchDeviceContacts: false, searchGroups: searchGroups, searchChannels: searchChannels, globalSearch: globalSearch)), filters: filters, isPeerEnabled: strongSelf.isPeerEnabled, selectionState: selectionState, isSearch: true)
|
||||
|
||||
Reference in New Issue
Block a user