Don't load old notifications from uninstalled apps
What Happened?
I had installed an app to test it, it sent some notifications, and then later I uninstalled it. It's old notifications were displayed with an image-missing icon
Steps to Reproduce
- Install an app that sends notifications
- Receive notifications in the indicator
- uninstall the app
- restart and notice that the icon is now unavailable and the notifications remain
Expected Behavior
We should probably just remove the notifications since they probably aren't of value anymore if the user uninstalled the app they belong to
OS Version
6.x (Odin)
Software Version
Latest release (I have run all updates)
Log Output
No response
Hardware Info
No response
I wonder how that could be done
1/ If that is only next session, simply check whether the app is there when loading the notifications from previous session Would it be slow if there are a lot of notifications? Why not simply not save them? But then the indicator needs to store at shutdown only?
2/ If that should be immediate, then have instead, when going uninstall in application menu on an app - have it also send a dbus signal to remove notifications of said app? But then that would be only flatpak apps? Would that be an issue? Lots of people still use Debs. That makes the functionality "half" useful?
3/ Or when showing the list, when indicator is clicked, check again for the whole list ? But then we make https://github.com/elementary/wingpanel-indicator-notifications/issues/237 worse/more common And/Or lag showing notifications ?
4/ Or instead when the list gets closed, since the user moved on to something else? But then the user needs to see the useless notifications one last time, get the feeling theyre still kept, then suddenly they arent there anymore? Like the above would that introduce lag for other indicators, because that one is hogging cpu?
I think 2/ would be most reasonable/more fluid and reactive ?