From a564fc1a1f91faf2a418fd6affadbd42c98825d8 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 19 Nov 2023 13:54:26 +0200 Subject: [PATCH] consistentcy and bugfix --- src/modules/notifications.js | 2 +- .../desktop_notification_utils/desktop_notification_utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/notifications.js b/src/modules/notifications.js index 9bd382206a..c1f5a63e73 100644 --- a/src/modules/notifications.js +++ b/src/modules/notifications.js @@ -150,7 +150,7 @@ export const notifications = { id, credentials: rootState.users.currentUser.credentials }).then(() => { - closeDesktopNotification(rootState, id) + closeDesktopNotification(rootState, { id }) }) }, dismissNotificationLocal ({ rootState, commit }, { id }) { diff --git a/src/services/desktop_notification_utils/desktop_notification_utils.js b/src/services/desktop_notification_utils/desktop_notification_utils.js index bde9f18cba..80b8c6e0aa 100644 --- a/src/services/desktop_notification_utils/desktop_notification_utils.js +++ b/src/services/desktop_notification_utils/desktop_notification_utils.js @@ -21,7 +21,7 @@ export const showDesktopNotification = (rootState, desktopNotificationOpts) => { } } -export const closeDesktopNotification = (rootState, id) => { +export const closeDesktopNotification = (rootState, { id }) => { if (!('Notification' in window && window.Notification.permission === 'granted')) return if (isSWSupported()) { @@ -33,6 +33,6 @@ export const closeAllDesktopNotifications = (rootState) => { if (!('Notification' in window && window.Notification.permission === 'granted')) return if (isSWSupported()) { - swCloseDesktopNotification() + swCloseDesktopNotification({}) } }