Add "Add Contact" options in contacts search

This commit is contained in:
Ilya Laktyushin
2020-11-17 14:12:30 +04:00
parent 3b7ee797b3
commit 191adb951b
7 changed files with 181 additions and 89 deletions

View File

@@ -124,7 +124,7 @@ final class ComposeControllerNode: ASDisplayNode {
return
}
self.searchDisplayController = SearchDisplayController(presentationData: self.presentationData, contentNode: ContactsSearchContainerNode(context: self.context, onlyWriteable: false, categories: [.cloudContacts, .global], openPeer: { [weak self] peer in
self.searchDisplayController = SearchDisplayController(presentationData: self.presentationData, contentNode: ContactsSearchContainerNode(context: self.context, onlyWriteable: false, categories: [.cloudContacts, .global], addContact: nil, openPeer: { [weak self] peer in
if let requestOpenPeerFromSearch = self?.requestOpenPeerFromSearch, case let .peer(peer, _, _) = peer {
requestOpenPeerFromSearch(peer.id)
}