Skip to content

Dismiss notifications automatically on quit and on new notifications

This dismisses toast notifications when the user tries to quit the app and when a new notification is created.

Previously some deleted files didn't actually get deleted because the delete() function is only called when a deletion notification gets dismissed. This could be triggered by quitting the application when a notification is visible, as seen on #97 (closed).

Note: Previously when a new notification was created while another is visible, it was queued and only shown when the previous notification got dismissed, either by timeout or user interaction. This implementation also causes the creation of new notifications to dismiss any currently visible ones, which fixes this bug. IMO the new behavior is also more consistent usability-wise because the currently shown notification always corresponds to the last deleted file, but if it is not desirable I could probably re-implement this fix to keep the old behavior.

Fixes #97 (closed).

Merge request reports