diff options
author | Andrew Jeffery <dev@jeffas.io> | 2020-07-18 13:12:44 +0100 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-07-19 11:16:05 +0200 |
commit | 126c9437e8bd6374a432a8af6cfe3e6d5227dcc2 (patch) | |
tree | 993609d12621e173d94ef968a304512622764756 | |
parent | 825996572f19e8c8ce1ed9480644ba2145d29d44 (diff) | |
download | aerc-126c9437e8bd6374a432a8af6cfe3e6d5227dcc2.tar.gz |
Only send directory info once from maildir
The directory info only needs to be sent once for all the messages, this reduces unnecessary messages being sent which could lock up the ui.
-rw-r--r-- | worker/maildir/worker.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go index 467f2aa..ce548ff 100644 --- a/worker/maildir/worker.go +++ b/worker/maildir/worker.go @@ -498,11 +498,12 @@ func (w *Worker) handleFlagMessages(msg *types.FlagMessages) error { Message: types.RespondTo(msg), Info: info, }, nil) - - w.worker.PostMessage(&types.DirectoryInfo{ - Info: w.getDirectoryInfo(w.selectedName), - }, nil) } + + w.worker.PostMessage(&types.DirectoryInfo{ + Info: w.getDirectoryInfo(w.selectedName), + }, nil) + return nil } |