diff options
author | Robin Jarry <robin@jarry.cc> | 2023-02-05 23:23:02 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-02-20 14:48:42 +0100 |
commit | 6af06c9dfec03e923589d34187ba8358e3423d5c (patch) | |
tree | 3722f17464ca651ebd12d7d6d55a0e97ae72c8ec /commands/account/search.go | |
parent | 34db5942bd7b642107002b75de9d5d5c7fe90e4c (diff) | |
download | aerc-6af06c9dfec03e923589d34187ba8358e3423d5c.tar.gz |
statusline: move files to lib/state
These modules will not handle statusline rendering after next commit.
Move them in lib/state to make next commit easier to review.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'commands/account/search.go')
-rw-r--r-- | commands/account/search.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/commands/account/search.go b/commands/account/search.go index 1494f788..71833afd 100644 --- a/commands/account/search.go +++ b/commands/account/search.go @@ -4,7 +4,7 @@ import ( "errors" "strings" - "git.sr.ht/~rjarry/aerc/lib/statusline" + "git.sr.ht/~rjarry/aerc/lib/state" "git.sr.ht/~rjarry/aerc/lib/ui" "git.sr.ht/~rjarry/aerc/log" "git.sr.ht/~rjarry/aerc/widgets" @@ -39,19 +39,19 @@ func (SearchFilter) Execute(aerc *widgets.Aerc, args []string) error { if len(args[1:]) == 0 { return Clear{}.Execute(aerc, []string{"clear"}) } - acct.SetStatus(statusline.FilterActivity("Filtering..."), statusline.Search("")) + acct.SetStatus(state.FilterActivity("Filtering..."), state.Search("")) store.SetFilter(args[1:]) cb := func(msg types.WorkerMessage) { if _, ok := msg.(*types.Done); ok { - acct.SetStatus(statusline.FilterResult(strings.Join(args, " "))) + acct.SetStatus(state.FilterResult(strings.Join(args, " "))) log.Tracef("Filter results: %v", store.Uids()) } } store.Sort(store.GetCurrentSortCriteria(), cb) } else { - acct.SetStatus(statusline.Search("Searching...")) + acct.SetStatus(state.Search("Searching...")) cb := func(uids []uint32) { - acct.SetStatus(statusline.Search(strings.Join(args, " "))) + acct.SetStatus(state.Search(strings.Join(args, " "))) log.Tracef("Search results: %v", uids) store.ApplySearch(uids) // TODO: Remove when stores have multiple OnUpdate handlers |