I have been using node-notifier with electronJs to send desktop notification. It was working fine till we had single notification in specified timeout of a single notification. Recently we are getting frequent notifications , while notifier does notify those notifications in quick sessions but the click handler does not work all the time as expected, sometimes it just works for the first notification, sometimes just for the last notification and other times just does not work at all. Here is my code,
notifier.on('click', (notifierObject, options) => {
console.log("clickinhbv"); // open list.html here
// let window = BrowserWindow.getFocusedWindow();
win.restore();
win.maximize();
});
let showNotification = args => {
notifier.notify({
title: args.title,
message: args.message,
timeout: 5,
icon: './favicon.png',
sound: false,
wait: false
}, (err, response) => {});
};
showNotification function is being called multiple times based on some events. is there any way to listen click events on all the notifications ?
via Rishabh Jain
No comments:
Post a Comment