fix(ProfilePopup): Bind to displayName if current user

This commit is contained in:
Igor Sirotin 2022-08-30 15:12:17 +03:00 committed by Igor Sirotin
parent 66b79fbda8
commit 980135fedf
1 changed files with 3 additions and 2 deletions

View File

@ -77,8 +77,10 @@ StatusDialog {
// All this should be improved more, but for now we leave it like this. // All this should be improved more, but for now we leave it like this.
const contactDetails = Utils.getContactDetailsAsJson(publicKey); const contactDetails = Utils.getContactDetailsAsJson(publicKey);
isCurrentUser = popup.profileStore.pubkey === publicKey;
userPublicKey = publicKey; userPublicKey = publicKey;
userDisplayName = contactDetails.displayName; userDisplayName = isCurrentUser ? Qt.binding(() => { return popup.profileStore.displayName }) : contactDetails.displayName;
userName = contactDetails.alias; userName = contactDetails.alias;
userNickname = contactDetails.localNickname; userNickname = contactDetails.localNickname;
userEnsName = contactDetails.name; userEnsName = contactDetails.name;
@ -116,7 +118,6 @@ StatusDialog {
isVerified = outgoingVerificationStatus === Constants.verificationStatus.verified isVerified = outgoingVerificationStatus === Constants.verificationStatus.verified
text = ""; // this is most likely unneeded text = ""; // this is most likely unneeded
isCurrentUser = popup.profileStore.pubkey === publicKey;
popup.open(); popup.open();