mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-24 23:31:30 +00:00
Fix issue with new notification trying to do a fetch.
This commit is contained in:
parent
11b8171fde
commit
501a5fb1e7
|
@ -686,18 +686,21 @@ export function notifyPrivateMessage(pmv: PrivateMessageView, router: any) {
|
||||||
function notify(info: NotifyInfo, router: any) {
|
function notify(info: NotifyInfo, router: any) {
|
||||||
messageToastify(info, router);
|
messageToastify(info, router);
|
||||||
|
|
||||||
if (Notification.permission !== "granted") Notification.requestPermission();
|
// TODO absolute nightmare bug, but notifs are currently broken.
|
||||||
else {
|
// Notification.new will try to do a browser fetch ???
|
||||||
var notification = new Notification(info.name, {
|
|
||||||
icon: info.icon,
|
|
||||||
body: info.body,
|
|
||||||
});
|
|
||||||
|
|
||||||
notification.onclick = (ev: Event): any => {
|
// if (Notification.permission !== "granted") Notification.requestPermission();
|
||||||
ev.preventDefault();
|
// else {
|
||||||
router.history.push(info.link);
|
// 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() {
|
export function setupTribute() {
|
||||||
|
|
Loading…
Reference in a new issue