From 77f03f1f02c245f37083cef435883229bbb70eaa Mon Sep 17 00:00:00 2001 From: Johannes Bachmann <45299708+dscheinah@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:11:17 +0100 Subject: [PATCH] Always append last message content to notifications (#514) * always append last message content to notifications * make "always show notification" configurable * add unfinished translations * Fix spacing if no sender is printed --- qml/components/settingsPage/SettingsBehavior.qml | 11 +++++++++++ src/appsettings.h | 6 ++++++ translations/harbour-fernschreiber-es.ts | 8 ++++++++ translations/harbour-fernschreiber.ts | 3 +++ 4 files changed, 28 insertions(+) diff --git a/qml/components/settingsPage/SettingsBehavior.qml b/qml/components/settingsPage/SettingsBehavior.qml index 2232791..c10aba7 100644 --- a/qml/components/settingsPage/SettingsBehavior.qml +++ b/qml/components/settingsPage/SettingsBehavior.qml @@ -216,6 +216,17 @@ AccordionItem { } } } + + 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 + } + } } } } diff --git a/src/appsettings.h b/src/appsettings.h index acc38b2..77090aa 100644 --- a/src/appsettings.h +++ b/src/appsettings.h @@ -97,9 +97,12 @@ public: bool notificationAlwaysShowPreview() const; void setNotificationAlwaysShowPreview(bool enable); +<<<<<<< HEAD bool goToQuotedMessage() const; void setGoToQuotedMessage(bool enable); +======= +>>>>>>> b11f7dd (Always append last message content to notifications (#514)) bool storageOptimizer() const; void setStorageOptimizer(bool enable); @@ -139,7 +142,10 @@ signals: void notificationSuppressContentChanged(); void notificationFeedbackChanged(); void notificationAlwaysShowPreviewChanged(); +<<<<<<< HEAD void goToQuotedMessageChanged(); +======= +>>>>>>> b11f7dd (Always append last message content to notifications (#514)) void storageOptimizerChanged(); void allowInlineBotLocationAccessChanged(); void remainingInteractionHintsChanged(); diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts index 6cef020..5669837 100644 --- a/translations/harbour-fernschreiber-es.ts +++ b/translations/harbour-fernschreiber-es.ts @@ -1618,6 +1618,14 @@ When tapping a quoted message, open it in chat instead of showing it in an overlay. Al Pulsar mensaje citado, abrirá en Charla en lugar de mostrarlo en una superposición. + + Always append message preview to notifications + + + + In addition to showing the number of unread messages, the latest message will also be appended to notifications. + + SettingsPage diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts index 134628e..a2fe241 100644 --- a/translations/harbour-fernschreiber.ts +++ b/translations/harbour-fernschreiber.ts @@ -1598,6 +1598,7 @@ In addition to showing the number of unread messages, the latest message will also be appended to notifications. +<<<<<<< HEAD Highlight unread messages @@ -1618,6 +1619,8 @@ When tapping a quoted message, open it in chat instead of showing it in an overlay. +======= +>>>>>>> b11f7dd (Always append last message content to notifications (#514)) SettingsPage