Description
- Desktop Notifier version: 6.0.0
- Python version: 3.11.10
- Operating System: Arch Linux
Description
Since #164 Desktop Notifier always creates custom notification identifiers and disregards/hides the "real" notification identifiers given by the backend. This has a major downside: It is now impossible to clear a notification from another process without some form of IPC, because the UUID to "real" identifier mapping is only known to the DesktopNotifier
instance that dispatched/sent that notification. This also means that one can't clear a notification that was sent by a process that exited already.
As far as I understand #164 right the goal was to make Notification
instances immutable? IMHO two things got mixed up here: There might indeed be some value (e.g. an UUID) to quickly identify a specific set of notification properties (title, message, icon, buttons, …), but this isn't the same as the identifier given by the backend after dispatching/sending the notification. Just think about dispatching/sending the same notification multiple times: The properties are the same, but the notification identifier changes.
IMHO there should be a DispatchedNotification
class instead that stores the backend's notification identifier as property and optionally also the Notification
instance, if that's still available (it is when the notification was sent by the same DesktopNotifier
, but might not otherwise). This class could then also have a clear()
method. DesktopNotifier.send_notification()
could then return instances of this class.
I switched to Desktop Notifier 5.0.1 with some (rather sketchy) code to get some features of v6.0 back (notably callbacks at the DesktopNotifier
level and to identify buttons) in the meantime.
In any case: Great project, thank you for sharing your work! ❤️