Refactor account labels
Move them out of NeoChatUser, where they don't make any sense
This commit is contained in:
committed by
Carl Schwan
parent
de55253e54
commit
f60114c7f6
@@ -168,7 +168,7 @@ QQC2.ToolBar {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
QQC2.Label {
|
||||
text: (Controller.activeConnection.localUser.accountLabel.length > 0 ? (Controller.activeConnection.localUser.accountLabel + " ") : "") + Controller.activeConnection.localUser.id
|
||||
text: (Controller.activeAccountLabel.length > 0 ? (Controller.activeAccountLabel + " ") : "") + Controller.activeConnection.localUser.id
|
||||
font.pointSize: displayNameLabel.font.pointSize * 0.8
|
||||
opacity: 0.7
|
||||
textFormat: Text.PlainText
|
||||
|
||||
@@ -92,7 +92,7 @@ Kirigami.ScrollablePage {
|
||||
MobileForm.FormTextFieldDelegate {
|
||||
id: accountLabel
|
||||
label: i18n("Label:")
|
||||
text: root.connection ? root.connection.localUser.accountLabel : ""
|
||||
text: root.connection ? Controller.activeAccountLabel : ""
|
||||
}
|
||||
MobileForm.AbstractFormDelegate {
|
||||
Layout.fillWidth: true
|
||||
@@ -112,8 +112,8 @@ Kirigami.ScrollablePage {
|
||||
if (root.connection.localUser.displayName !== name.text) {
|
||||
root.connection.localUser.rename(name.text);
|
||||
}
|
||||
if (root.connection.localUser.accountLabel !== accountLabel.text) {
|
||||
root.connection.localUser.setAccountLabel(accountLabel.text);
|
||||
if (Controller.activeAccountLabel !== accountLabel.text) {
|
||||
Controller.activeAccountLabel = accountLabel.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user