aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.ts
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2024-05-13 22:31:23 +0100
committerLibravatar GitHub <noreply@github.com>2024-05-13 22:31:23 +0100
commit0ed2bacd83a05ce3190bfa7124a04a0de6abf9fc (patch)
tree462821dd34526fd889365b81f5e1d990c85e4257 /src/stores/ServicesStore.ts
parent6.7.4-nightly.9 [skip ci] (diff)
downloadferdium-app-0ed2bacd83a05ce3190bfa7124a04a0de6abf9fc.tar.gz
ferdium-app-0ed2bacd83a05ce3190bfa7124a04a0de6abf9fc.tar.zst
ferdium-app-0ed2bacd83a05ce3190bfa7124a04a0de6abf9fc.zip
Fix notifications on all services (#1593)
* refactor class * Revert "refactor class" This reverts commit 7e266d7aa4905f236457c44f9ffc37fa8f742b4c. * refactor: change logic * Working logic (but double notifications) * fix: final adjustments
Diffstat (limited to 'src/stores/ServicesStore.ts')
-rw-r--r--src/stores/ServicesStore.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts
index 9f2cfeca3..58c6b2a87 100644
--- a/src/stores/ServicesStore.ts
+++ b/src/stores/ServicesStore.ts
@@ -917,12 +917,13 @@ export default class ServicesStore extends TypedStore {
917 917
918 if (service.isNotificationEnabled) { 918 if (service.isNotificationEnabled) {
919 let title: string; 919 let title: string;
920 options.icon = service.iconUrl;
921 if (this.stores.settings.all.app.privateNotifications === true) { 920 if (this.stores.settings.all.app.privateNotifications === true) {
922 // Remove message data from notification in private mode 921 // Remove message data from notification in private mode
923 options.body = ''; 922 options.body = '';
923 options.icon = service.icon;
924 title = `Notification from ${service.name}`; 924 title = `Notification from ${service.name}`;
925 } else { 925 } else {
926 options.icon = options.icon || service.icon;
926 options.body = typeof options.body === 'string' ? options.body : ''; 927 options.body = typeof options.body === 'string' ? options.body : '';
927 title = 928 title =
928 typeof args[0].title === 'string' ? args[0].title : service.name; 929 typeof args[0].title === 'string' ? args[0].title : service.name;