fix(ChatHeaderContentView): reflect nickname changes in 1-1 chat
Fixes #8303
This commit is contained in:
parent
f022e02efe
commit
6e5b98d157
|
@ -334,7 +334,7 @@ method onContactDetailsUpdated*(self: Module, contactId: string) =
|
||||||
item.messageContainsMentions = m.containsContactMentions()
|
item.messageContainsMentions = m.containsContactMentions()
|
||||||
|
|
||||||
if(self.controller.getMyChatId() == contactId):
|
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)
|
self.view.updateTrustStatus(updatedContact.details.trustStatus == TrustStatus.Untrustworthy)
|
||||||
|
|
||||||
method onNotificationsUpdated*(self: Module, hasUnreadMessages: bool, notificationCount: int) =
|
method onNotificationsUpdated*(self: Module, hasUnreadMessages: bool, notificationCount: int) =
|
||||||
|
|
|
@ -267,18 +267,7 @@ Item {
|
||||||
readonly property string emojiIcon: chatContentModule? chatContentModule.chatDetails.emoji : "" // Needed for test
|
readonly property string emojiIcon: chatContentModule? chatContentModule.chatDetails.emoji : "" // Needed for test
|
||||||
|
|
||||||
objectName: "chatInfoBtnInHeader"
|
objectName: "chatInfoBtnInHeader"
|
||||||
title: {
|
title: chatContentModule? chatContentModule.chatDetails.name : ""
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
subTitle: {
|
subTitle: {
|
||||||
if(!chatContentModule)
|
if(!chatContentModule)
|
||||||
|
|
Loading…
Reference in New Issue