elementary / wingpanel-indicator-notifications

Wingpanel Notifications Indicator
GNU Lesser General Public License v2.1
24 stars 10 forks source link

Remove notification from list if bubble dismissed; give accurate tooltip count #243

Closed jeremypw closed 1 year ago

jeremypw commented 2 years ago

At present if a notification bubble is actively dismissed it remains in the wingpanel list and has to be dismissed again to get rid of it. This seems unexpected. This PR removes notifications from the list if they are actively closed by the user or a "CloseNotification" method call.

It is open to question whether this should also happen in reverse i.e. urgent bubbles should disappear if cleared from the wingpanel list (at present they do not) but that is left for another PR (after hiding bubbles when the indicator is open is implemented).

There was existing code in the NotificationsMonitor that appeared to be intended to implement this already but it did not detect NotificationClosed signals.

A superfluous function/signal was removed from Notification; the Indicator detects when a notification is closed.

TomiOhl commented 1 year ago

Bumping this - any reason this PR is abandoned? Seems to be a welcome change based on the 🎉 reactions

jeremypw commented 1 year ago

Re-testing this as it is old. Notice that the indicator tooltip gives an inaccurate notification count - checking if occurs in master. Yes, it does.

jeremypw commented 1 year ago

I have fixed the tooltip count here, but that could be split out if necessary.