mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 13:59:55 +01:00
Remove auto-dismissing notifications
This commit is contained in:
parent
c71405ccad
commit
f481cdd00b
1 changed files with 1 additions and 4 deletions
|
@ -2,8 +2,5 @@ export const showDesktopNotification = (rootState, desktopNotificationOpts) => {
|
|||
if (!('Notification' in window && window.Notification.permission === 'granted')) return
|
||||
if (rootState.statuses.notifications.desktopNotificationSilence) { return }
|
||||
|
||||
const desktopNotification = new window.Notification(desktopNotificationOpts.title, desktopNotificationOpts)
|
||||
// Chrome is known for not closing notifications automatically
|
||||
// according to MDN, anyway.
|
||||
setTimeout(desktopNotification.close.bind(desktopNotification), 5000)
|
||||
return new window.Notification(desktopNotificationOpts.title, desktopNotificationOpts)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue