fix: Reload contact info whenever the profile dirty flag is dropped

We need to manually request the contact information again because the contact object is not live
This commit is contained in:
Alex Jbanca 2024-05-14 11:15:15 +03:00 committed by Alex Jbanca
parent 6e1fe678bd
commit 27bfe22af0
2 changed files with 14 additions and 7 deletions

View File

@ -129,6 +129,11 @@ Pane {
d.reload() d.reload()
} }
onDirtyChanged: {
if (!dirty)
d.reload()
}
Component { Component {
id: btnEditProfileComponent id: btnEditProfileComponent
StatusButton { StatusButton {
@ -504,8 +509,7 @@ Pane {
font.bold: true font.bold: true
font.pixelSize: 22 font.pixelSize: 22
elide: Text.ElideRight elide: Text.ElideRight
text: root.dirty ? root.dirtyValues.displayName text: StatusQUtils.Emoji.parse(root.dirty ? root.dirtyValues.displayName : d.mainDisplayName, StatusQUtils.Emoji.size.middle)
: StatusQUtils.Emoji.parse(d.mainDisplayName, StatusQUtils.Emoji.size.middle)
} }
StatusContactVerificationIcons { StatusContactVerificationIcons {
id: verificationIcons id: verificationIcons
@ -633,7 +637,8 @@ Pane {
Layout.preferredHeight: 300 Layout.preferredHeight: 300
currentTabIndex: showcaseTabBar.currentIndex currentTabIndex: showcaseTabBar.currentIndex
mainDisplayName: d.mainDisplayName mainDisplayName: root.dirty ? root.dirtyValues.displayName
: d.mainDisplayName
readOnly: root.readOnly readOnly: root.readOnly
communitiesModel: root.showcaseCommunitiesModel communitiesModel: root.showcaseCommunitiesModel

View File

@ -50,6 +50,8 @@ Control {
property int delegateHeightS: 152 property int delegateHeightS: 152
property int delegateWidthM: 202 property int delegateWidthM: 202
property int delegateHeightM: 160 property int delegateHeightM: 160
readonly property string displayNameVerySmallEmoji: StatusQUtils.Emoji.parse(root.mainDisplayName, StatusQUtils.Emoji.size.verySmall)
} }
component PositionSFPM: SortFilterProxyModel { component PositionSFPM: SortFilterProxyModel {
@ -127,7 +129,7 @@ Control {
cellWidth: d.delegateWidthM cellWidth: d.delegateWidthM
cellHeight: d.delegateHeightM cellHeight: d.delegateHeightM
mainDisplayName: root.mainDisplayName mainDisplayName: d.displayNameVerySmallEmoji
readOnly: root.readOnly readOnly: root.readOnly
globalAssetsModel: root.globalAssetsModel globalAssetsModel: root.globalAssetsModel
globalCollectiblesModel: root.globalCollectiblesModel globalCollectiblesModel: root.globalCollectiblesModel
@ -142,7 +144,7 @@ Control {
width: parent.width width: parent.width
height: parent.height height: parent.height
mainDisplayName: root.mainDisplayName mainDisplayName: d.displayNameVerySmallEmoji
sendToAccountEnabled: root.sendToAccountEnabled sendToAccountEnabled: root.sendToAccountEnabled
accountsModel: accountsProxyModel accountsModel: accountsProxyModel
walletStore: root.walletStore walletStore: root.walletStore
@ -160,7 +162,7 @@ Control {
cellWidth: d.delegateWidthS cellWidth: d.delegateWidthS
cellHeight: d.delegateHeightS cellHeight: d.delegateHeightS
mainDisplayName: root.mainDisplayName mainDisplayName: d.displayNameVerySmallEmoji
collectiblesModel: collectiblesProxyModel collectiblesModel: collectiblesProxyModel
walletStore: root.walletStore walletStore: root.walletStore
@ -199,7 +201,7 @@ Control {
cellWidth: d.delegateWidthS cellWidth: d.delegateWidthS
cellHeight: d.delegateHeightS cellHeight: d.delegateHeightS
mainDisplayName: root.mainDisplayName mainDisplayName: d.displayNameVerySmallEmoji
socialLinksModel: socialLinksProxyModel socialLinksModel: socialLinksProxyModel
onCopyToClipboard: root.copyToClipboard(text) onCopyToClipboard: root.copyToClipboard(text)