Various fixes

This commit is contained in:
Ilya Laktyushin
2024-07-20 16:59:08 +04:00
parent 29a1d4ed2f
commit fed488a806
7 changed files with 172 additions and 104 deletions

View File

@@ -17,6 +17,7 @@ import ChatSendMessageActionUI
class ContactSelectionControllerImpl: ViewController, ContactSelectionController, PresentableController, AttachmentContainable {
private let context: AccountContext
private let mode: ContactSelectionControllerMode
private let autoDismiss: Bool
fileprivate var contactsNode: ContactSelectionControllerNode {
@@ -35,7 +36,7 @@ class ContactSelectionControllerImpl: ViewController, ContactSelectionController
private let index: PeerNameIndex = .lastNameFirst
private let titleProducer: (PresentationStrings) -> String
private let options: [ContactListAdditionalOption]
private let options: Signal<[ContactListAdditionalOption], NoError>
private let displayDeviceContacts: Bool
private let displayCallIcons: Bool
private let multipleSelection: Bool
@@ -94,6 +95,7 @@ class ContactSelectionControllerImpl: ViewController, ContactSelectionController
init(_ params: ContactSelectionControllerParams) {
self.context = params.context
self.mode = params.mode
self.autoDismiss = params.autoDismiss
self.titleProducer = params.title
self.options = params.options
@@ -207,7 +209,7 @@ class ContactSelectionControllerImpl: ViewController, ContactSelectionController
}
override func loadDisplayNode() {
self.displayNode = ContactSelectionControllerNode(context: self.context, presentationData: self.presentationData, options: self.options, displayDeviceContacts: self.displayDeviceContacts, displayCallIcons: self.displayCallIcons, multipleSelection: self.multipleSelection, requirePhoneNumbers: self.requirePhoneNumbers)
self.displayNode = ContactSelectionControllerNode(context: self.context, mode: self.mode, presentationData: self.presentationData, options: self.options, displayDeviceContacts: self.displayDeviceContacts, displayCallIcons: self.displayCallIcons, multipleSelection: self.multipleSelection, requirePhoneNumbers: self.requirePhoneNumbers)
self._ready.set(self.contactsNode.contactListNode.ready)
self.contactsNode.navigationBar = self.navigationBar