Fixed the issue doesn't show nickname on profileview in 1:1 chat. Fixes #1826
This commit is contained in:
parent
7b5a1660f8
commit
972cf9f138
|
@ -64,6 +64,17 @@ QtObject:
|
|||
QtProperty[string] name:
|
||||
read = name
|
||||
notify = contactsUpdated
|
||||
|
||||
proc nickname*(self: ChatItemView): string {.slot.} =
|
||||
if self.chatItem != nil and self.chatItem.chatType.isOneToOne:
|
||||
if self.status.chat.contacts.hasKey(self.chatItem.id) and self.status.chat.contacts[self.chatItem.id].hasNickname():
|
||||
return self.status.chat.contacts[self.chatItem.id].localNickname
|
||||
else:
|
||||
result = ""
|
||||
|
||||
QtProperty[string] nickname:
|
||||
read = nickname
|
||||
notify = contactsUpdated
|
||||
|
||||
proc ensVerified*(self: ChatItemView): bool {.slot.} =
|
||||
if self.chatItem != nil and
|
||||
|
|
|
@ -42,7 +42,7 @@ Rectangle {
|
|||
break;
|
||||
case Constants.chatTypeOneToOne:
|
||||
const profileImage = appMain.getProfileImage(chatsModel.activeChannel.id)
|
||||
openProfilePopup(chatsModel.activeChannel.name, chatsModel.activeChannel.id, profileImage || chatsModel.activeChannel.identicon)
|
||||
openProfilePopup(chatsModel.activeChannel.name, chatsModel.activeChannel.id, profileImage || chatsModel.activeChannel.identicon, "", chatsModel.activeChannel.nickname)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue