aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-02-19 22:26:47 +0100
committerRobin Jarry <robin@jarry.cc>2022-02-19 22:29:40 +0100
commite3842033904af9f4fc0e829b6f23de0579453052 (patch)
treea81a14e34b8bc968c6d9a19f4054d3a2ea2aa880 /commands
parentbca93cd91536d3062c51df242b901d6edac3fac0 (diff)
downloadaerc-e3842033904af9f4fc0e829b6f23de0579453052.tar.gz
search/filter: remove from status bar after 20 seconds
The status is not cleared. It is annoying. Fixes: c37f1eaaeaa1 ("filter/search: display current search/filter arguments") Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands')
-rw-r--r--commands/account/search.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/commands/account/search.go b/commands/account/search.go
index be4df9d0..e12f9725 100644
--- a/commands/account/search.go
+++ b/commands/account/search.go
@@ -3,6 +3,7 @@ package account
import (
"errors"
"fmt"
+ "time"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -33,16 +34,16 @@ func (SearchFilter) Execute(aerc *widgets.Aerc, args []string) error {
var cb func([]uint32)
if args[0] == "filter" {
- aerc.SetStatus("Filtering...")
+ aerc.PushStatus("Filtering...", 10*time.Second)
cb = func(uids []uint32) {
- aerc.SetStatus(fmt.Sprintf("Filter complete %s", args))
+ aerc.PushStatus(fmt.Sprintf("Filter complete %s", args), 20*time.Second)
acct.Logger().Printf("Filter results: %v", uids)
store.ApplyFilter(uids)
}
} else {
- aerc.SetStatus("Searching...")
+ aerc.PushStatus("Searching...", 10*time.Second)
cb = func(uids []uint32) {
- aerc.SetStatus(fmt.Sprintf("Search complete %s", args))
+ aerc.PushStatus(fmt.Sprintf("Search complete %s", args), 20*time.Second)
acct.Logger().Printf("Search results: %v", uids)
store.ApplySearch(uids)
// TODO: Remove when stores have multiple OnUpdate handlers