fix: user display name discrepancies

restore taking local nickname into account in various places
This commit is contained in:
Lukáš Tinkl 2023-01-20 16:33:21 +01:00 committed by Lukáš Tinkl
parent 0fb954b640
commit a55a207bb2
3 changed files with 4 additions and 3 deletions

View File

@ -146,7 +146,8 @@ proc initItem*(
if result.quotedMessageAuthorAvatar == "":
result.quotedMessageAuthorAvatar = quotedMessageDiscordMessage.author.avatarUrl
else:
result.quotedMessageAuthorDisplayName = quotedMessageAuthorDetails.details.displayName
result.quotedMessageAuthorDisplayName = if quotedMessageAuthorDetails.details.localNickname != "": quotedMessageAuthorDetails.details.localNickname
else: quotedMessageAuthorDetails.details.displayName
result.quotedMessageAuthorAvatar = quotedMessageAuthorDetails.details.image.thumbnail
if contentType == ContentType.DiscordMessage:

View File

@ -96,7 +96,7 @@ Item {
messageContextMenu.isProfile = true
messageContextMenu.myPublicKey = userProfile.pubKey
messageContextMenu.selectedUserPublicKey = model.pubKey
messageContextMenu.selectedUserDisplayName = model.displayName
messageContextMenu.selectedUserDisplayName = nickName || userName
messageContextMenu.selectedUserIcon = model.icon
messageContextMenu.popup(4, 4)
} else if (mouse.button === Qt.LeftButton && !!messageContextMenu) {

View File

@ -641,7 +641,7 @@ Loader {
sender.isContact: quotedMessageAuthorDetailsIsContact
sender.displayName: quotedMessageAuthorDetailsDisplayName
sender.isEnsVerified: quotedMessageAuthorDetailsEnsVerified
sender.secondaryName: quotedMessageAuthorDetailsName || ""
sender.secondaryName: quotedMessageAuthorDetailsName
sender.profileImage {
width: 20
height: 20