node-notifier icon indicating copy to clipboard operation
node-notifier copied to clipboard

Hold Notifications in Windows 10 Notification Center

Open Catscratch opened this issue 6 years ago • 10 comments

Hey,

on Windows 10, notifications are shows for some seconds. Afterwards they disappear.

It would be helpful that notifications stay in Windows notification center and are not removed after showing them.

Is this currently possible?

Catscratch avatar Mar 06 '18 13:03 Catscratch

You can set the option wait: true, which will keep the notification there until the user clicks it. You can also set a callback function to do something after the user clicks it:

notifier.notify({
  title: 'mytitle',
  message: 'mymessage',
  icon: path.join('', '/image.png'),
  sound: false,
  wait: true
}, function(err, response) {
   //your callback code
});

paddotk avatar Mar 29 '18 13:03 paddotk

Hm, I'm using YakYak which uses node-notifier. See here:

https://github.com/yakyak/yakyak/blob/master/src/ui/views/notifications.coffee#L80

Wait is already set to true, but notifications still disappear after some seconds. (Windows 10)

Catscratch avatar Apr 04 '18 09:04 Catscratch

Also happens with me, even setting wait: true on Windows 10.

marceloavf avatar Apr 11 '18 14:04 marceloavf

I have the same problem. Running Windows 10 too.

tajnymag avatar May 01 '18 11:05 tajnymag

same here, Win 10 too

-edit: I managed to "fix" that, check https://github.com/electron/electron/issues/3916#issuecomment-250439021

baskax avatar Jun 19 '18 08:06 baskax

same after wait:true

anwar3606 avatar Sep 01 '18 16:09 anwar3606

This should definitely be an option rather than being hard-coded. Cases where a notification exists, for example, to alert the user to get up and stretch every 20 minutes, start to get quite spammy if they persist in the notification centre.

axefrog avatar Mar 06 '19 23:03 axefrog

i have the same problem, i set "show notification in the action center" but the callback is not responding, the same code works fine in mac

BluFenix00 avatar Mar 22 '19 13:03 BluFenix00

i've got the same problem on both operating systems (windows 10 and mac). when the timeout is triggered then the notification is destroyed and the message in the notification center is removed. where is the problem?

SebastianRuecker avatar May 14 '19 16:05 SebastianRuecker

somebody manage to solve this problem?

giladdekel avatar Jul 21 '21 11:07 giladdekel