diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2023-04-16 09:53:36 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-04-22 22:40:12 +0200 |
commit | 91ac21ac615582e2dd5e36f4b36bde1bc0bf38d8 (patch) | |
tree | 718dd2cdcb045ca50fdc98f5c6486e0c90c94f29 /worker/notmuch | |
parent | 6220711f90d769cbee1ae855dd6a33964626f5a4 (diff) | |
download | aerc-91ac21ac615582e2dd5e36f4b36bde1bc0bf38d8.tar.gz |
msgstore: fetch message list based on OpenDirectory msg
Fetching the message list is done in a convoluted way. The UI receives a
DirectoryInfo message, which creates a message store. It then receives a
second DirectoryInfo (an oddity from the IMAP worker), and this
DirectoryInfo is passed to the message store which then requests a fetch
of the message list via store.Sort.
Use the OpenDirectory done response to tell the message store to fetch
messages. This makes the code easier to follow, and does not rely on
quirks from the IMAP worker.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/notmuch')
-rw-r--r-- | worker/notmuch/eventhandlers.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/worker/notmuch/eventhandlers.go b/worker/notmuch/eventhandlers.go index 2b03d68b..996187fa 100644 --- a/worker/notmuch/eventhandlers.go +++ b/worker/notmuch/eventhandlers.go @@ -30,16 +30,14 @@ func (w *worker) handleUpdateDirCounts() error { for name := range folders { query := fmt.Sprintf("folder:%s", strconv.Quote(name)) w.w.PostMessage(&types.DirectoryInfo{ - Info: w.getDirectoryInfo(name, query), - SkipSort: true, + Info: w.getDirectoryInfo(name, query), }, nil) } } for name, query := range w.nameQueryMap { w.w.PostMessage(&types.DirectoryInfo{ - Info: w.getDirectoryInfo(name, query), - SkipSort: true, + Info: w.getDirectoryInfo(name, query), }, nil) } return nil |