refactored notifications into their own module separate from statuses (WIP)
This commit is contained in:
parent
fffa7a4f4a
commit
aad3225d25
10 changed files with 170 additions and 158 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue