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
room, then while keys are being shared sending one with another account,
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
- Do something when access token is invalid
@ -169,5 +170,6 @@
- Previewing room without joining
- Distribution
- requirements file
- Include python dependencies in binary with rcc?
- README.md

View File

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