diff options
author | Hugo Osvaldo Barrera <hugo@whynothugo.nl> | 2024-07-06 23:59:07 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-08-03 20:16:00 +0200 |
commit | d20c578de4267ab23ad2deb579bc841ec23d734b (patch) | |
tree | e7233faa4a61de2a73f6d5d73f4e401ed33da563 /worker/notmuch/worker.go | |
parent | 0c52e80bb7e61394aa30e62c8c8b69fa17c706df (diff) | |
download | aerc-d20c578de4267ab23ad2deb579bc841ec23d734b.tar.gz |
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 <hugo@whynothugo.nl>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/notmuch/worker.go')
-rw-r--r-- | worker/notmuch/worker.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |