2020-07-12 21:06:45 +00:00
|
|
|
export const showDesktopNotification = (rootState, desktopNotificationOpts) => {
|
|
|
|
if (!('Notification' in window && window.Notification.permission === 'granted')) return
|
|
|
|
if (rootState.statuses.notifications.desktopNotificationSilence) { return }
|
|
|
|
|
2022-06-23 19:31:30 +00:00
|
|
|
return new window.Notification(desktopNotificationOpts.title, desktopNotificationOpts)
|
2020-07-12 21:06:45 +00:00
|
|
|
}
|