fb-mac-messenger icon indicating copy to clipboard operation
fb-mac-messenger copied to clipboard

Notification is not cleared when it is clicked in Notification Center

Open Juholei opened this issue 10 years ago • 2 comments

Notifications stay in Notification Center until they are all manually cleared. I think when a notification is clicked, it should be cleared alongside other notifications that are related to the same conversation.

Juholei avatar May 10 '15 07:05 Juholei

This is unfortunately due to a limitation of how notifications are implemented and the window.Notification API. Notifications in OS X are not "objects in memory" but completely managed by the system and cleared via APIs that accept per-app unique string keys. These keys are mapped to notifications in the JS environment (actually, owned by the web view's global JS context.) If the app is reloaded or restarted, that information is lost (unique keys).

A PR fixing this would be welcome, though it will probably require some decent skills in JavaScriptCore programming (memory management is hairy.)

rsms avatar Jun 08 '15 00:06 rsms

Would it be sufficient to just clear all the notifications for the app when the app comes into focus? Or is that too much?

daviesgeek avatar Nov 03 '16 21:11 daviesgeek