From: Dessalines Date: Sat, 4 Sep 2021 05:20:25 +0000 (-0400) Subject: Fix issue with new notification trying to do a fetch. (#398) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%7Bthis.state.thumbnail%7D?a=commitdiff_plain;h=a19c84c03e15129afaf679ac08148548b1f24cbf;p=lemmy-ui.git Fix issue with new notification trying to do a fetch. (#398) --- diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 86e513b..f54e259 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -686,18 +686,21 @@ export function notifyPrivateMessage(pmv: PrivateMessageView, router: any) { function notify(info: NotifyInfo, router: any) { messageToastify(info, router); - if (Notification.permission !== "granted") Notification.requestPermission(); - else { - var notification = new Notification(info.name, { - icon: info.icon, - body: info.body, - }); - - notification.onclick = (ev: Event): any => { - ev.preventDefault(); - router.history.push(info.link); - }; - } + // TODO absolute nightmare bug, but notifs are currently broken. + // Notification.new will try to do a browser fetch ??? + + // if (Notification.permission !== "granted") Notification.requestPermission(); + // else { + // var notification = new Notification(info.name, { + // icon: info.icon, + // body: info.body, + // }); + + // notification.onclick = (ev: Event): any => { + // ev.preventDefault(); + // router.history.push(info.link); + // }; + // } } export function setupTribute() {