fix: [Profile flow] Nickname not updated after it was added, edited or removed
- trigger a reload of contact details when the secondary popup has been closed Fixes #13870
This commit is contained in:
parent
13c2653e2f
commit
1e13d8f122
|
@ -136,8 +136,8 @@ QtObject {
|
|||
openPopup(profilePopupComponent, {publicKey: publicKey, parentPopup: parentPopup}, cb)
|
||||
}
|
||||
|
||||
function openNicknamePopup(publicKey: string, contactDetails) {
|
||||
openPopup(nicknamePopupComponent, {publicKey, contactDetails})
|
||||
function openNicknamePopup(publicKey: string, contactDetails, cb) {
|
||||
openPopup(nicknamePopupComponent, {publicKey, contactDetails}, cb)
|
||||
}
|
||||
|
||||
function openMarkAsUntrustedPopup(publicKey: string, contactDetails) {
|
||||
|
|
|
@ -161,7 +161,7 @@ Pane {
|
|||
size: StatusButton.Size.Small
|
||||
text: qsTr("Send contact request")
|
||||
onClicked: Global.openContactRequestPopup(root.publicKey, d.contactDetails,
|
||||
popup => popup.closed.connect(d.reload))
|
||||
popup => popup.accepted.connect(d.reload))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,8 @@ Pane {
|
|||
text: d.userNickName ? qsTr("Edit nickname") : qsTr("Add nickname")
|
||||
icon.name: "edit_pencil"
|
||||
onTriggered: {
|
||||
Global.openNicknamePopupRequested(root.publicKey, d.contactDetails)
|
||||
Global.openNicknamePopupRequested(root.publicKey, d.contactDetails,
|
||||
popup => popup.closed.connect(d.reload))
|
||||
}
|
||||
}
|
||||
StatusAction {
|
||||
|
@ -427,7 +428,7 @@ Pane {
|
|||
type: StatusAction.Type.Danger
|
||||
enabled: d.isContact && (d.isTrusted || d.isLocallyTrusted)
|
||||
onTriggered: Global.openRemoveIDVerificationDialog(root.publicKey, d.contactDetails,
|
||||
popup => popup.closed.connect(d.reload))
|
||||
popup => popup.accepted.connect(d.reload))
|
||||
}
|
||||
StatusAction {
|
||||
text: qsTr("Remove nickname")
|
||||
|
|
|
@ -206,7 +206,7 @@ StatusMenu {
|
|||
text: contactDetails.localNickname ? qsTr("Edit nickname") : qsTr("Add nickname")
|
||||
icon.name: "edit_pencil"
|
||||
enabled: !root.isMe && !root.isBridgedAccount
|
||||
onTriggered: Global.openNicknamePopupRequested(root.selectedUserPublicKey, root.contactDetails)
|
||||
onTriggered: Global.openNicknamePopupRequested(root.selectedUserPublicKey, root.contactDetails, null)
|
||||
}
|
||||
|
||||
StatusMenuSeparator {
|
||||
|
|
|
@ -31,7 +31,7 @@ QtObject {
|
|||
|
||||
signal openPopupRequested(var popupComponent, var params)
|
||||
signal closePopupRequested()
|
||||
signal openNicknamePopupRequested(string publicKey, var contactDetails)
|
||||
signal openNicknamePopupRequested(string publicKey, var contactDetails, var cb)
|
||||
signal openDownloadModalRequested(bool available, string version, string url)
|
||||
signal openChangeProfilePicPopup(var cb)
|
||||
signal openBackUpSeedPopup()
|
||||
|
|
Loading…
Reference in New Issue