Fix account settings name field getting reset

This commit is contained in:
miruka 2019-09-10 21:58:28 -04:00
parent 7797b0e1eb
commit 7211dd8fda
2 changed files with 10 additions and 6 deletions

View File

@ -18,6 +18,7 @@
- Message order isn't preserved when sending a first message in a E2E - Message order isn't preserved when sending a first message in a E2E
room, then while keys are being shared sending one with another account, room, then while keys are being shared sending one with another account,
then sending one with the first account again then sending one with the first account again
- Left rooms reappear as joined rooms
- If account not in config anymore, discard ui state last page on startup - If account not in config anymore, discard ui state last page on startup
- Do something when access token is invalid - Do something when access token is invalid
@ -169,5 +170,6 @@
- Previewing room without joining - Previewing room without joining
- Distribution - Distribution
- requirements file
- Include python dependencies in binary with rcc? - Include python dependencies in binary with rcc?
- README.md - README.md

View File

@ -57,7 +57,7 @@ HGridLayout {
id: avatar id: avatar
userId: editAccount.userId userId: editAccount.userId
displayName: accountInfo.display_name displayName: nameField.field.text
avatarUrl: accountInfo.avatar_url avatarUrl: accountInfo.avatar_url
imageUrl: fileDialog.selectedFile || fileDialog.file || defaultImageUrl imageUrl: fileDialog.selectedFile || fileDialog.file || defaultImageUrl
toolTipImageUrl: "" toolTipImageUrl: ""
@ -146,18 +146,19 @@ HGridLayout {
HLabeledTextField { HLabeledTextField {
property bool changed: field.text != accountInfo.display_name property bool changed: field.text != accountInfo.display_name
property string fText: field.text readonly property string fText: field.text
onFTextChanged: editAccount.headerName = field.text onFTextChanged: editAccount.headerName = field.text
id: nameField id: nameField
label.text: qsTr("Display name:") label.text: qsTr("Display name:")
field.text: accountInfo.display_name
field.onAccepted: applyChanges() field.onAccepted: applyChanges()
Component.onCompleted: field.text = accountInfo.display_name
Keys.onEscapePressed: cancelChanges()
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: 480 Layout.maximumWidth: 480
Keys.onEscapePressed: cancelChanges()
} }
HLabeledTextField { HLabeledTextField {
@ -168,9 +169,10 @@ HGridLayout {
id: aliasField id: aliasField
label.text: qsTr("Write alias:") label.text: qsTr("Write alias:")
field.text: currentAlias
field.onAccepted: applyChanges() field.onAccepted: applyChanges()
Component.onCompleted: field.text = currentAlias
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: 480 Layout.maximumWidth: 480