From d20c578de4267ab23ad2deb579bc841ec23d734b Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 6 Jul 2024 23:59:07 +0200 Subject: notmuch: only send Done event if deletion succeeds A Done event was sent from the worker to the UI unconditionally, so even if the deletion operation failed, the UI showed a "N messages deleted" confirmation. When no messages are deleted, don't send the done event. Given that the same function already sends an error in case of any failures, this error is what remains visible in the status bar. Signed-off-by: Hugo Osvaldo Barrera Acked-by: Robin Jarry --- worker/notmuch/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'worker/notmuch/worker.go') diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go index bedc83c6..249347ce 100644 --- a/worker/notmuch/worker.go +++ b/worker/notmuch/worker.go @@ -785,8 +785,8 @@ func (w *worker) handleDeleteMessages(msg *types.DeleteMessages) error { Message: types.RespondTo(msg), Uids: deleted, }, nil) + w.done(msg) } - w.done(msg) return nil } -- cgit