From c0b51b574c8f1d0d330cc7c21cb13074982bc7dc Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 21 Jul 2019 08:57:17 -0400 Subject: [PATCH] ui-settings: Rename write_aliases to writeAliases --- src/python/config_files.py | 2 +- src/qml/Chat/SendBox.qml | 2 +- src/qml/Pages/EditAccount/Profile.qml | 4 ++-- src/qml/UI.qml | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/python/config_files.py b/src/python/config_files.py index 0045d16f..7dc92478 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -88,7 +88,7 @@ class UISettings(JSONConfigFile): async def default_data(self) -> JsonData: return { - "write_aliases": {} + "writeAliases": {} } diff --git a/src/qml/Chat/SendBox.qml b/src/qml/Chat/SendBox.qml index f2ece5d5..17722bd5 100644 --- a/src/qml/Chat/SendBox.qml +++ b/src/qml/Chat/SendBox.qml @@ -8,7 +8,7 @@ import "../Base" HRectangle { function setFocus() { areaScrollView.forceActiveFocus() } - property var aliases: window.settings.write_aliases + property var aliases: window.settings.writeAliases property string writingUserId: chatPage.userId property string toSend: "" diff --git a/src/qml/Pages/EditAccount/Profile.qml b/src/qml/Pages/EditAccount/Profile.qml index 7713de8c..d34bfd30 100644 --- a/src/qml/Pages/EditAccount/Profile.qml +++ b/src/qml/Pages/EditAccount/Profile.qml @@ -20,7 +20,7 @@ HGridLayout { } if (aliasField.changed) { - window.settings.write_aliases[userId] = aliasField.field.text + window.settings.writeAliases[userId] = aliasField.field.text window.settingsChanged() } @@ -138,7 +138,7 @@ HGridLayout { HLabeledTextField { property string currentAlias: - window.settings.write_aliases[userId] || "" + window.settings.writeAliases[userId] || "" property bool changed: field.text != currentAlias diff --git a/src/qml/UI.qml b/src/qml/UI.qml index 1ae20113..0202303f 100644 --- a/src/qml/UI.qml +++ b/src/qml/UI.qml @@ -14,7 +14,10 @@ Item { Connections { target: py onWillLoadAccounts: will => { - if (! will) { pageStack.showPage("SignIn") } + if (! will) { + pageStack.showPage("SignIn") + return + } let page = window.uiState.page let props = window.uiState.pageProperties