From 94b9d557dee0fd13853b1883cc2730c5cbdbcd3f Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Wed, 28 Aug 2019 06:39:07 +0200 Subject: extract search criteria parsing into the backends --- lib/msgstore.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/msgstore.go b/lib/msgstore.go index 169d51d..77f0fe5 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -4,8 +4,6 @@ import ( "io" "time" - "github.com/emersion/go-imap" - "git.sr.ht/~sircmpwn/aerc/models" "git.sr.ht/~sircmpwn/aerc/worker/types" ) @@ -368,9 +366,9 @@ func (store *MessageStore) Prev() { store.NextPrev(-1) } -func (store *MessageStore) Search(c *imap.SearchCriteria, cb func([]uint32)) { +func (store *MessageStore) Search(args []string, cb func([]uint32)) { store.worker.PostAction(&types.SearchDirectory{ - Criteria: c, + Argv: args, }, func(msg types.WorkerMessage) { switch msg := msg.(type) { case *types.SearchResults: -- cgit v1.2.3