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.
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();