blob: c31a103076c2a5fc8ce76bd86248488947ae63fd (
plain)
1
2
3
4
5
6
7
8
|
import { showDesktopNotification as swDesktopNotification } from '../sw/sw.js'
export const showDesktopNotification = (rootState, desktopNotificationOpts) => {
if (!('Notification' in window && window.Notification.permission === 'granted')) return
if (rootState.statuses.notifications.desktopNotificationSilence) { return }
swDesktopNotification(desktopNotificationOpts)
}
|