about summary refs log tree commit diff stats
path: root/worker/maildir/worker.go
diff options
context:
space:
mode:
authorAndrew Jeffery <dev@jeffas.io>2020-07-18 13:12:44 +0100
committerReto Brunner <reto@labrat.space>2020-07-19 11:16:05 +0200
commit126c9437e8bd6374a432a8af6cfe3e6d5227dcc2 (patch)
tree993609d12621e173d94ef968a304512622764756 /worker/maildir/worker.go
parent825996572f19e8c8ce1ed9480644ba2145d29d44 (diff)
downloadaerc-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.
Diffstat (limited to 'worker/maildir/worker.go')
-rw-r--r--worker/maildir/worker.go9
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
 }