From 4ea558bfa5934457e0d138e923c32a68894dbf2e Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sun, 19 Nov 2023 13:52:18 +0200 Subject: [PATCH] Tweaked notification feedback settings UI (#526) --- .../settingsPage/SettingsBehavior.qml | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/qml/components/settingsPage/SettingsBehavior.qml b/qml/components/settingsPage/SettingsBehavior.qml index c10aba7..678473d 100644 --- a/qml/components/settingsPage/SettingsBehavior.qml +++ b/qml/components/settingsPage/SettingsBehavior.qml @@ -216,15 +216,35 @@ AccordionItem { } } } + TextSwitch { + checked: appSettings.notificationSuppressContent && enabled + text: qsTr("Hide content in notifications") + enabled: parent.enabled + automaticCheck: false + onClicked: { + appSettings.notificationSuppressContent = !checked + } + } - TextSwitch { - width: parent.columnWidth - checked: appSettings.notificationAlwaysShowPreview - text: qsTr("Always append message preview to notifications") - description: qsTr("In addition to showing the number of unread messages, the latest message will also be appended to notifications.") - automaticCheck: false - onClicked: { - appSettings.notificationAlwaysShowPreview = !checked + TextSwitch { + checked: appSettings.notificationTurnsDisplayOn && enabled + text: qsTr("Notification turns on the display") + enabled: parent.enabled + automaticCheck: false + onClicked: { + appSettings.notificationTurnsDisplayOn = !checked + } + } + + TextSwitch { + checked: appSettings.notificationSoundsEnabled && enabled + text: qsTr("Enable notification sounds") + description: qsTr("When sounds are enabled, Fernschreiber will use the current Sailfish OS notification sound for chats, which can be configured in the system settings.") + enabled: parent.enabled + automaticCheck: false + onClicked: { + appSettings.notificationSoundsEnabled = !checked + } } } }