diff --git a/ui/app/AppLayouts/Profile/stores/ContactsStore.qml b/ui/app/AppLayouts/Profile/stores/ContactsStore.qml index 0f219aca1b..b2e017caca 100644 --- a/ui/app/AppLayouts/Profile/stores/ContactsStore.qml +++ b/ui/app/AppLayouts/Profile/stores/ContactsStore.qml @@ -8,6 +8,8 @@ import utils 1.0 QtObject { id: root + signal contactInfoRequestFinished(string publicKey, bool ok) + readonly property QtObject _d: QtObject { id: d @@ -18,6 +20,7 @@ QtObject { Component.onCompleted: { mainModuleInst.resolvedENS.connect(root.resolvedENS) contactsModuleInst.trustStatusRemoved.connect(root.trustStatusRemoved) + contactsModuleInst.contactInfoRequestFinished.connect(root.contactInfoRequestFinished) } } diff --git a/ui/imports/shared/popups/SendContactRequestModal.qml b/ui/imports/shared/popups/SendContactRequestModal.qml index 41c5f12014..cbdd372b68 100644 --- a/ui/imports/shared/popups/SendContactRequestModal.qml +++ b/ui/imports/shared/popups/SendContactRequestModal.qml @@ -9,6 +9,7 @@ import StatusQ.Core.Theme 0.1 import StatusQ.Controls 0.1 import StatusQ.Controls.Validators 0.1 import StatusQ.Popups.Dialog 0.1 +import StatusQ.Core.Utils 0.1 as SQUtils import AppLayouts.stores 1.0 as AppLayoutStores @@ -44,13 +45,16 @@ CommonContactDialog { } readonly property var _conn: Connections { - target: root.rootStore.contactStore.contactsModule + enabled: root.loadingContactDetails + target: root.rootStore.contactStore function onContactInfoRequestFinished(publicKey, ok) { - if (publicKey !== root.publicKey) + if (publicKey !== root.publicKey) { return - if (ok) - root.contactDetails = Utils.getContactDetailsAsJson(root.publicKey, false) + } + if (ok) { + root.contactDetails = SQUtils.ModelUtils.getByKey(root.rootStore.contactStore.contactsModel, "pubKey", root.publicKey) + } root.loadingContactDetails = false } }