From 75d3b346ac4e446204f1fa88e07eafec2c95276b Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sat, 23 Jan 2021 17:15:34 +0100 Subject: [PATCH] Actually save the settings --- imports/NeoChat/Page/SettingsPage.qml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/imports/NeoChat/Page/SettingsPage.qml b/imports/NeoChat/Page/SettingsPage.qml index ecc6ce638..a350ad6f5 100644 --- a/imports/NeoChat/Page/SettingsPage.qml +++ b/imports/NeoChat/Page/SettingsPage.qml @@ -22,29 +22,44 @@ Kirigami.ScrollablePage { Kirigami.FormData.label: i18n("Notifications and events:") text: i18n("Show notifications") checked: Config.showNotifications - onToggled: Config.showNotifications = checked + onToggled: { + Config.showNotifications = checked + Config.save() + } } QQC2.CheckBox { text: i18n("Show leave and join events") checked: Config.showLeaveJoinEvent - onToggled: Config.showLeaveJoinEvent = checked + onToggled: { + Config.showLeaveJoinEvent = checked + Config.save() + } } QQC2.RadioButton { Kirigami.FormData.label: i18n("Rooms and private chats:") text: i18n("Separated") checked: !Config.mergeRoomList - onToggled: Config.mergeRoomList = false + onToggled: { + Config.mergeRoomList = false + Config.save() + } } QQC2.RadioButton { text: i18n("Intermixed") checked: Config.mergeRoomList - onToggled: Config.mergeRoomList = true + onToggled: { + Config.mergeRoomList = true + Config.save() + } } QQC2.CheckBox { Kirigami.FormData.label: i18n("Timeline:") text: i18n("Show User Avatar") checked: Config.showAvatarInTimeline - onToggled: Config.showAvatarInTimeline = checked + onToggled: { + Config.showAvatarInTimeline = checked + Config.save() + } } } }