fix(ChatHeaderContentView): reflect nickname changes in 1-1 chat

Fixes #8303
This commit is contained in:
Lukáš Tinkl 2022-11-17 10:55:49 +01:00 committed by Lukáš Tinkl
parent f022e02efe
commit 6e5b98d157
2 changed files with 2 additions and 13 deletions

View File

@ -334,7 +334,7 @@ method onContactDetailsUpdated*(self: Module, contactId: string) =
item.messageContainsMentions = m.containsContactMentions()
if(self.controller.getMyChatId() == contactId):
self.view.updateChatDetailsNameAndIcon(updatedContact.details.displayName, updatedContact.icon)
self.view.updateChatDetailsNameAndIcon(updatedContact.defaultDisplayName, updatedContact.icon)
self.view.updateTrustStatus(updatedContact.details.trustStatus == TrustStatus.Untrustworthy)
method onNotificationsUpdated*(self: Module, hasUnreadMessages: bool, notificationCount: int) =

View File

@ -267,18 +267,7 @@ Item {
readonly property string emojiIcon: chatContentModule? chatContentModule.chatDetails.emoji : "" // Needed for test
objectName: "chatInfoBtnInHeader"
title: {
const module = root.rootStore.currentChatContentModule()
if(!module)
return ""
if (module.chatDetails.type === Constants.chatType.oneToOne) {
const d = Utils.getContactDetailsAsJson(module.chatDetails.id)
if (!!d.displayName)
return d.displayName
}
return module.chatDetails.name
}
title: chatContentModule? chatContentModule.chatDetails.name : ""
subTitle: {
if(!chatContentModule)