fix(@desktop/chat): Fix showing contact names after restoring account
Fixes #7241
This commit is contained in:
parent
0f1ade6967
commit
a45770cc98
|
@ -75,7 +75,7 @@ method onNewMessagesLoaded*(self: Module, messages: seq[MessageDto]) =
|
|||
let status = toOnlineStatus(statusUpdateDto.statusType)
|
||||
self.view.model().addItem(initMemberItem(
|
||||
pubKey = m.`from`,
|
||||
displayName = contactDetails.details.displayName,
|
||||
displayName = contactDetails.displayName,
|
||||
ensName = contactDetails.details.name, # is it correct?
|
||||
localNickname = contactDetails.details.localNickname,
|
||||
alias = contactDetails.details.alias,
|
||||
|
@ -133,7 +133,6 @@ method addChatMember*(self: Module, member: ChatMember) =
|
|||
let isMe = member.id == singletonInstance.userProfile.getPubKey()
|
||||
let contactDetails = self.controller.getContactDetails(member.id)
|
||||
var status = OnlineStatus.Online
|
||||
var displayName = contactDetails.details.displayName
|
||||
if (isMe):
|
||||
let currentUserStatus = intToEnum(singletonInstance.userProfile.getCurrentUserStatus(), StatusType.Unknown)
|
||||
status = toOnlineStatus(currentUserStatus)
|
||||
|
@ -143,7 +142,7 @@ method addChatMember*(self: Module, member: ChatMember) =
|
|||
|
||||
self.view.model().addItem(initMemberItem(
|
||||
pubKey = member.id,
|
||||
displayName = contactDetails.details.displayName,
|
||||
displayName = contactDetails.displayName,
|
||||
ensName = contactDetails.details.name,
|
||||
localNickname = contactDetails.details.localNickname,
|
||||
alias = contactDetails.details.alias,
|
||||
|
|
|
@ -102,7 +102,7 @@ Item {
|
|||
messageContextMenu.myPublicKey = userProfile.pubKey
|
||||
messageContextMenu.selectedUserPublicKey = model.pubKey
|
||||
messageContextMenu.selectedUserDisplayName = model.displayName
|
||||
messageContextMenu.selectedUserIcon = asset.source
|
||||
messageContextMenu.selectedUserIcon = model.icon
|
||||
messageContextMenu.popup(4, 4)
|
||||
} else if (mouse.button === Qt.LeftButton && !!messageContextMenu) {
|
||||
Global.openProfilePopup(model.pubKey);
|
||||
|
|
Loading…
Reference in New Issue