fix: react to contact name (nickname) changes
the contact details are fetched imperatively in these popups (not via model updates), so we need to setup a signal to be able to react to those changes
This commit is contained in:
parent
691de11211
commit
297b73fced
|
@ -362,6 +362,7 @@ QtObject {
|
||||||
onEditDone: {
|
onEditDone: {
|
||||||
if (nickname !== newNickname) {
|
if (nickname !== newNickname) {
|
||||||
rootStore.contactStore.changeContactNickname(publicKey, newNickname)
|
rootStore.contactStore.changeContactNickname(publicKey, newNickname)
|
||||||
|
Global.contactRenamed(publicKey)
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,15 @@ ActivityNotificationBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Global
|
||||||
|
|
||||||
|
function onContactRenamed(pubKey) {
|
||||||
|
if (pubKey === root.contactId)
|
||||||
|
root.updateContactDetails()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bodyComponent: MouseArea {
|
bodyComponent: MouseArea {
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
implicitHeight: messageView.implicitHeight
|
implicitHeight: messageView.implicitHeight
|
||||||
|
|
|
@ -122,6 +122,15 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly property var conns4: Connections {
|
||||||
|
target: Global
|
||||||
|
|
||||||
|
function onContactRenamed(pubKey) {
|
||||||
|
if (pubKey === root.publicKey)
|
||||||
|
d.reload()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readonly property var timer: Timer {
|
readonly property var timer: Timer {
|
||||||
id: timer
|
id: timer
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ QtObject {
|
||||||
signal openInviteFriendsToCommunityPopup(var community, var communitySectionModule, var cb)
|
signal openInviteFriendsToCommunityPopup(var community, var communitySectionModule, var cb)
|
||||||
signal openIncomingIDRequestPopup(string publicKey, var cb)
|
signal openIncomingIDRequestPopup(string publicKey, var cb)
|
||||||
signal openOutgoingIDRequestPopup(string publicKey, var cb)
|
signal openOutgoingIDRequestPopup(string publicKey, var cb)
|
||||||
|
signal contactRenamed(string publicKey)
|
||||||
|
|
||||||
signal openLink(string link)
|
signal openLink(string link)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue