From 980135fedf1bc547aa134c3c4c019f7802d1d701 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Tue, 30 Aug 2022 15:12:17 +0300 Subject: [PATCH] fix(ProfilePopup): Bind to displayName if current user --- ui/imports/shared/popups/ProfilePopup.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/imports/shared/popups/ProfilePopup.qml b/ui/imports/shared/popups/ProfilePopup.qml index 4aaa1f5317..9b02fc5927 100644 --- a/ui/imports/shared/popups/ProfilePopup.qml +++ b/ui/imports/shared/popups/ProfilePopup.qml @@ -77,8 +77,10 @@ StatusDialog { // All this should be improved more, but for now we leave it like this. const contactDetails = Utils.getContactDetailsAsJson(publicKey); + isCurrentUser = popup.profileStore.pubkey === publicKey; + userPublicKey = publicKey; - userDisplayName = contactDetails.displayName; + userDisplayName = isCurrentUser ? Qt.binding(() => { return popup.profileStore.displayName }) : contactDetails.displayName; userName = contactDetails.alias; userNickname = contactDetails.localNickname; userEnsName = contactDetails.name; @@ -116,7 +118,6 @@ StatusDialog { isVerified = outgoingVerificationStatus === Constants.verificationStatus.verified text = ""; // this is most likely unneeded - isCurrentUser = popup.profileStore.pubkey === publicKey; popup.open();