diff --git a/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml b/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml index 0a5c02e357..7caf0b28f2 100644 --- a/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml @@ -21,8 +21,8 @@ ModalPopup { signal joinPrivateChat(string publicKey, string ensName) signal profileClicked() - function doJoin(pk, ensName) { - popup.joinPrivateChat(pk, Utils.isChatKey(pk) ? "" : ensName); + function doJoin(pubKey, username) { + popup.joinPrivateChat(pubKey, Utils.isChatKey(pubKey) ? "" : username); popup.close(); } @@ -31,8 +31,7 @@ ModalPopup { contactFieldAndList.pubKey = "" contactFieldAndList.ensUsername = "" contactFieldAndList.chatKey.forceActiveFocus(Qt.MouseFocusReason) - // Not Refactored Yet -// contactFieldAndList.existingContacts.visible = popup.store.allContacts.hasAddedContacts() + contactFieldAndList.existingContacts.visible = contactsStore.myContactsModel.count > 0 contactFieldAndList.noContactsRect.visible = !contactFieldAndList.existingContacts.visible } @@ -45,8 +44,8 @@ ModalPopup { contactsStore: popup.contactsStore - onUserClicked: function (isContact, pubKey, ensName) { - popup.doJoin(pubKey, ensName); + onUserClicked: function (pubKey, isAddedContact, username) { + popup.doJoin(pubKey, username); } } diff --git a/ui/imports/shared/controls/AddressInput.qml b/ui/imports/shared/controls/AddressInput.qml index d619987b6e..1f0244eb5c 100644 --- a/ui/imports/shared/controls/AddressInput.qml +++ b/ui/imports/shared/controls/AddressInput.qml @@ -55,8 +55,9 @@ Item { contactsStore: root.contactsStore - onUserClicked: function (isContact, pubKey, ensName, address) { - chatKey.text = address + onUserClicked: function (pubKey, isContact) { + console.warning("This is not refactored yet. We need to figure out where to get the address from") + //chatKey.text = address } searchResultsWidth: parentWidth chatKey.customHeight: 56 diff --git a/ui/imports/shared/controls/ContactsListAndSearch.qml b/ui/imports/shared/controls/ContactsListAndSearch.qml index 27d2c8e435..12c3106bbd 100644 --- a/ui/imports/shared/controls/ContactsListAndSearch.qml +++ b/ui/imports/shared/controls/ContactsListAndSearch.qml @@ -32,7 +32,7 @@ Item { property bool showCheckbox: false property bool showContactList: true property bool showSearch: true - signal userClicked(string pubKey, bool isAddedContact) + signal userClicked(string pubKey, bool isAddedContact, string name) property var pubKeys: ([]) property bool hideCommunityMembers: false property bool addContactEnabled: true @@ -197,7 +197,7 @@ Item { } root.pubKeys = pubKeysCopy - userClicked(contact.pubKey, contact.isContact) + userClicked(contact.pubKey, contact.isContact, contact.name) } expanded: !searchResults.loading && pubKey === "" && !searchResults.showProfileNotFoundMessage } @@ -215,7 +215,7 @@ Item { if (!validate()) { return } - userClicked(pubKey, isAddedContact) + userClicked(pubKey, isAddedContact, username) } onAddToContactsButtonClicked: { root.contactsStore.addContact(pubKey) diff --git a/ui/imports/shared/views/SearchResults.qml b/ui/imports/shared/views/SearchResults.qml index 66b246ebfd..1c2bff726c 100644 --- a/ui/imports/shared/views/SearchResults.qml +++ b/ui/imports/shared/views/SearchResults.qml @@ -35,7 +35,7 @@ Item { return root.pubKey != "" ? Utils.getContactDetailsAsJson(root.pubKey).isContact : false } - signal resultClicked(string pubKey, bool isAddedContact) + signal resultClicked(string pubKey, bool isAddedContact, string username) signal addToContactsButtonClicked(string pubKey) function reset() { @@ -117,7 +117,7 @@ Item { onExited: foundContact.hovered = false onClicked: { if (root.resultClickable) { - root.resultClicked(root.pubKey, root.isAddedContact) + root.resultClicked(root.pubKey, root.isAddedContact, root.username) } } }