summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-08-30 10:28:46 -0500
committerRobin Jarry <robin@jarry.cc>2022-08-30 21:42:37 +0200
commit921382a9bfec02525cd24e66b2598a27ddcb6020 (patch)
tree8fe87656108efebf3cc0f48eece900bfe25f2994
parent8eab82964986a82312c2cc678965c31257e48c50 (diff)
downloadaerc-921382a9bfec02525cd24e66b2598a27ddcb6020.tar.gz
aerc-921382a9bfec02525cd24e66b2598a27ddcb6020.zip
maildir: do not send dircontents on fs event
The maildir worker watches the file system for events (new mail, moved mail, copied mail, etc). On an event, the worker sends a DirectoryContents message and a DirectoryInfo message. Do not send DirectoryContents on FS Event in the maildir worker. The DirectoryInfo message already triggers the UI to request the new DirectoryContents, and does so in a more predictable way (IE any currently applied filter is applied). Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--worker/maildir/worker.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index e85caacc..0ece323b 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -115,19 +115,6 @@ func (w *Worker) handleFSEvent(ev fsnotify.Event) {
return
}
- uids, err := w.c.UIDs(*w.selected)
- if err != nil {
- logging.Errorf("could not scan UIDs: %w", err)
- return
- }
- sortedUids, err := w.sort(uids, w.currentSortCriteria)
- if err != nil {
- logging.Errorf("error sorting directory: %w", err)
- return
- }
- w.worker.PostMessage(&types.DirectoryContents{
- Uids: sortedUids,
- }, nil)
dirInfo := w.getDirectoryInfo(w.selectedName)
w.worker.PostMessage(&types.DirectoryInfo{
Info: dirInfo,