refactored notifications into their own module separate from statuses (WIP)

This commit is contained in:
Henry Jameson 2023-11-16 19:26:18 +02:00
commit aad3225d25
10 changed files with 170 additions and 158 deletions

View file

@ -7,7 +7,7 @@ const state = { failCreateNotif: false }
export const showDesktopNotification = (rootState, desktopNotificationOpts) => {
if (!('Notification' in window && window.Notification.permission === 'granted')) return
if (rootState.statuses.notifications.desktopNotificationSilence) { return }
if (rootState.notifications.desktopNotificationSilence) { return }
if (isSWSupported()) {
swDesktopNotification(desktopNotificationOpts)