parent
8aebb81137
commit
a598ddd1e5
|
@ -8,6 +8,8 @@ import utils 1.0
|
||||||
QtObject {
|
QtObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
signal contactInfoRequestFinished(string publicKey, bool ok)
|
||||||
|
|
||||||
readonly property QtObject _d: QtObject {
|
readonly property QtObject _d: QtObject {
|
||||||
id: d
|
id: d
|
||||||
|
|
||||||
|
@ -18,6 +20,7 @@ QtObject {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
mainModuleInst.resolvedENS.connect(root.resolvedENS)
|
mainModuleInst.resolvedENS.connect(root.resolvedENS)
|
||||||
contactsModuleInst.trustStatusRemoved.connect(root.trustStatusRemoved)
|
contactsModuleInst.trustStatusRemoved.connect(root.trustStatusRemoved)
|
||||||
|
contactsModuleInst.contactInfoRequestFinished.connect(root.contactInfoRequestFinished)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import StatusQ.Core.Theme 0.1
|
||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
import StatusQ.Controls.Validators 0.1
|
import StatusQ.Controls.Validators 0.1
|
||||||
import StatusQ.Popups.Dialog 0.1
|
import StatusQ.Popups.Dialog 0.1
|
||||||
|
import StatusQ.Core.Utils 0.1 as SQUtils
|
||||||
|
|
||||||
import AppLayouts.stores 1.0 as AppLayoutStores
|
import AppLayouts.stores 1.0 as AppLayoutStores
|
||||||
|
|
||||||
|
@ -44,13 +45,16 @@ CommonContactDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property var _conn: Connections {
|
readonly property var _conn: Connections {
|
||||||
target: root.rootStore.contactStore.contactsModule
|
enabled: root.loadingContactDetails
|
||||||
|
target: root.rootStore.contactStore
|
||||||
|
|
||||||
function onContactInfoRequestFinished(publicKey, ok) {
|
function onContactInfoRequestFinished(publicKey, ok) {
|
||||||
if (publicKey !== root.publicKey)
|
if (publicKey !== root.publicKey) {
|
||||||
return
|
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
|
root.loadingContactDetails = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue