diff --git a/src/qml/Pages/EditAccount/EditAccount.qml b/src/qml/Pages/EditAccount/EditAccount.qml index df6ceedc..3d2478d0 100644 --- a/src/qml/Pages/EditAccount/EditAccount.qml +++ b/src/qml/Pages/EditAccount/EditAccount.qml @@ -17,11 +17,12 @@ HPage { readonly property var userInfo: users.find(userId) readonly property bool ready: userInfo && ! userInfo.loading + property string headerName: userInfo ? userInfo.displayName : "" + hideHeaderUnderHeight: avatarPreferredSize - headerLabel.text: - qsTr("Account settings for %1").arg( - Utils.coloredNameHtml(userInfo ? userInfo.displayName : "", userId) - ) + headerLabel.text: qsTr("Account settings for %1").arg( + Utils.coloredNameHtml(headerName, userId) + ) HRectangle { color: ready ? theme.controls.box.background : "transparent" diff --git a/src/qml/Pages/EditAccount/Profile.qml b/src/qml/Pages/EditAccount/Profile.qml index d34bfd30..c4c555ea 100644 --- a/src/qml/Pages/EditAccount/Profile.qml +++ b/src/qml/Pages/EditAccount/Profile.qml @@ -15,6 +15,8 @@ HGridLayout { py.callClientCoro( userId, "set_displayname", [nameField.field.text], () => { saveButton.nameChangeRunning = false + editAccount.headerName = + Qt.binding(() => userInfo.displayName) } ) } @@ -42,6 +44,8 @@ HGridLayout { aliasField.field.text = aliasField.currentAlias fileDialog.selectedFile = "" fileDialog.file = "" + + editAccount.headerName = Qt.binding(() => userInfo.displayName) } columns: 2 @@ -127,6 +131,9 @@ HGridLayout { HLabeledTextField { property bool changed: field.text != userInfo.displayName + property string fText: field.text + onFTextChanged: editAccount.headerName = field.text + id: nameField label.text: qsTr("Display name:") field.text: userInfo.displayName