mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various Improvements
This commit is contained in:
@@ -56,6 +56,7 @@ final class ContactsControllerNode: ASDisplayNode {
|
||||
var requestAddContact: ((String) -> Void)?
|
||||
var openPeopleNearby: (() -> Void)?
|
||||
var openInvite: (() -> Void)?
|
||||
var openQrScan: (() -> Void)?
|
||||
|
||||
private var presentationData: PresentationData
|
||||
private var presentationDataDisposable: Disposable?
|
||||
@@ -70,8 +71,12 @@ final class ContactsControllerNode: ASDisplayNode {
|
||||
|
||||
var addNearbyImpl: (() -> Void)?
|
||||
var inviteImpl: (() -> Void)?
|
||||
var qrScanImpl: (() -> Void)?
|
||||
|
||||
let options = [ContactListAdditionalOption(title: presentationData.strings.Contacts_AddPeopleNearby, icon: .generic(UIImage(bundleImageName: "Contact List/PeopleNearbyIcon")!), action: {
|
||||
addNearbyImpl?()
|
||||
}), ContactListAdditionalOption(title: presentationData.strings.Contacts_ScanQrCode, icon: .generic(UIImage(bundleImageName: "Settings/QrIcon")!), action: {
|
||||
qrScanImpl?()
|
||||
}), ContactListAdditionalOption(title: presentationData.strings.Contacts_InviteFriends, icon: .generic(UIImage(bundleImageName: "Contact List/AddMemberIcon")!), action: {
|
||||
inviteImpl?()
|
||||
})]
|
||||
@@ -128,6 +133,12 @@ final class ContactsControllerNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
qrScanImpl = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
strongSelf.openQrScan?()
|
||||
}
|
||||
}
|
||||
|
||||
contextAction = { [weak self] peer, node, gesture in
|
||||
self?.contextAction(peer: peer, node: node, gesture: gesture)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user