Open Simon-Laux opened 2 years ago
see also #2199 and #2198
looks like this is an general electron problem: https://github.com/electron/electron/issues/32261
signal seems to close all notifications when you close the app, this could maybe also be an option
Since electron "forgets" about all exisiting notifications when closed and there is no chance to access the existing system notifications on start we can't solve this.
It is possible when we use the system apis directly, it is quite common to do that with electron. for example there is a popular npm package for advanced windows notifications (https://www.electronjs.org/de/docs/latest/tutorial/notifications#use-advanced-notifications).
the apis we can use on MacOS https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/getdeliverednotifications(completionhandler:) https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/removedeliverednotifications(withidentifiers:)
On windows I'm not sure, could be this: https://learn.microsoft.com/en-us/uwp/api/windows.ui.notifications.toastnotificationhistory?view=winrt-26100
Linux has dbus, so I assume it's also possible to track notifications via the id across multiple sessions: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html
when closing DeltaChat it's notifications stay, but even after re-opening DC they don't work anymore (you can click on them all you want nothing happens, at least on MacOS). Furthermore those notifications are not cleared, when reading the messages they belong to.
This is likely an electron issue, so the only thing we could do is trying to clear notifications on exiting DeltaChat, but that might not be a good idea, because they could sometimes remind the user of messages they missed. So maybe we should close this with the #wont-fix label for now?