From da9ffc169f27eb3b4be2bca1562a43a0c0c980f8 Mon Sep 17 00:00:00 2001 From: Matteo Percivaldi <26527954+matperc@users.noreply.github.com> Date: Fri, 4 Apr 2025 08:35:03 +0200 Subject: [PATCH] mu4e-notification: close notification once done --- mu4e/mu4e-notification.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mu4e/mu4e-notification.el b/mu4e/mu4e-notification.el index 1d47742f..bb68b5b1 100644 --- a/mu4e/mu4e-notification.el +++ b/mu4e/mu4e-notification.el @@ -72,6 +72,11 @@ messages changed since the last notification and is greater than zero." (when-let* ((fav (mu4e-bookmark-favorite)) (delta-unread (plist-get fav :delta-unread))) + (when (and (fboundp 'notifications-close-notification) + mu4e--notification-id + (zerop delta-unread)) + (notifications-close-notification mu4e--notification-id) + (setq mu4e--notification-id nil)) (when (and (> delta-unread 0) (not (= delta-unread mu4e--last-delta-unread))) (setq mu4e--last-delta-unread delta-unread) ;; update