Bro in my application I will send notifications if It was in notification panel how to configure it if I click notification in windows panel it have to open the app instead it is clearingnotification.on('click', () => { if (win === null) { createWindow(); } else if (win && !win.isVisible()) { win.show(); } else if(win && win.isVisible()) { win.show(); } else { if (win) win.show(); } }) notification.show(); lastNotification = notification }
#Notification Panel
21 messages · Page 1 of 1 (latest)
what's the point of these two else if if they do that same as the else?
oh it's a third else if lol
Okay bro I'll remove it but the issue is how to open notification in windows panel bro if click the notifications it is clearing in Notification panel but I want it to open my app thats my issue
don't call me "bro" please
how do you init the notification?
Do you see a console.log if you try this?
const notification = new Notification({ title: "Test Title", body: "Test Body" });
notification.on('click', (event, arg) => {
console.log("clicked");
});
notification.show();
Bro my above functions are working clearly but I want to know how to open my app notification in windows panel
@outer laurel
stop calling me bro
what's your window config?
The show() should work if your window is created and hidden. Maybe you can try to add an event.preventDefault();
Not working
@outer laurel
Hey how to add title icon on notifications @outer laurel