aboutsummaryrefslogtreecommitdiffstats
path: root/commands/account
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account')
-rw-r--r--commands/account/cf.go4
-rw-r--r--commands/account/clear.go4
-rw-r--r--commands/account/connection.go8
-rw-r--r--commands/account/search.go10
-rw-r--r--commands/account/sort.go6
5 files changed, 16 insertions, 16 deletions
diff --git a/commands/account/cf.go b/commands/account/cf.go
index 39b0bb89..f0fa3b67 100644
--- a/commands/account/cf.go
+++ b/commands/account/cf.go
@@ -5,7 +5,7 @@ import (
"strings"
"git.sr.ht/~rjarry/aerc/commands"
- "git.sr.ht/~rjarry/aerc/lib/statusline"
+ "git.sr.ht/~rjarry/aerc/lib/state"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -51,7 +51,7 @@ func (ChangeFolder) Execute(aerc *widgets.Aerc, args []string) error {
store := acct.Store()
if store != nil {
store.ApplyClear()
- acct.SetStatus(statusline.SearchFilterClear())
+ acct.SetStatus(state.SearchFilterClear())
}
return nil
}
diff --git a/commands/account/clear.go b/commands/account/clear.go
index 6d1e7b0a..a383b621 100644
--- a/commands/account/clear.go
+++ b/commands/account/clear.go
@@ -3,7 +3,7 @@ package account
import (
"errors"
- "git.sr.ht/~rjarry/aerc/lib/statusline"
+ "git.sr.ht/~rjarry/aerc/lib/state"
"git.sr.ht/~rjarry/aerc/widgets"
"git.sr.ht/~sircmpwn/getopt"
)
@@ -52,7 +52,7 @@ func (Clear) Execute(aerc *widgets.Aerc, args []string) error {
defer store.Select(0)
}
store.ApplyClear()
- acct.SetStatus(statusline.SearchFilterClear())
+ acct.SetStatus(state.SearchFilterClear())
return nil
}
diff --git a/commands/account/connection.go b/commands/account/connection.go
index 52b569c4..0a67b2fe 100644
--- a/commands/account/connection.go
+++ b/commands/account/connection.go
@@ -3,7 +3,7 @@ package account
import (
"errors"
- "git.sr.ht/~rjarry/aerc/lib/statusline"
+ "git.sr.ht/~rjarry/aerc/lib/state"
"git.sr.ht/~rjarry/aerc/widgets"
"git.sr.ht/~rjarry/aerc/worker/types"
)
@@ -28,14 +28,14 @@ func (Connection) Execute(aerc *widgets.Aerc, args []string) error {
return errors.New("No account selected")
}
cb := func(msg types.WorkerMessage) {
- acct.SetStatus(statusline.ConnectionActivity(""))
+ acct.SetStatus(state.ConnectionActivity(""))
}
if args[0] == "connect" {
acct.Worker().PostAction(&types.Connect{}, cb)
- acct.SetStatus(statusline.ConnectionActivity("Connecting..."))
+ acct.SetStatus(state.ConnectionActivity("Connecting..."))
} else {
acct.Worker().PostAction(&types.Disconnect{}, cb)
- acct.SetStatus(statusline.ConnectionActivity("Disconnecting..."))
+ acct.SetStatus(state.ConnectionActivity("Disconnecting..."))
}
return nil
}
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
diff --git a/commands/account/sort.go b/commands/account/sort.go
index f8cb94c1..cabe10ec 100644
--- a/commands/account/sort.go
+++ b/commands/account/sort.go
@@ -6,7 +6,7 @@ import (
"git.sr.ht/~rjarry/aerc/commands"
"git.sr.ht/~rjarry/aerc/lib/sort"
- "git.sr.ht/~rjarry/aerc/lib/statusline"
+ "git.sr.ht/~rjarry/aerc/lib/state"
"git.sr.ht/~rjarry/aerc/widgets"
"git.sr.ht/~rjarry/aerc/worker/types"
)
@@ -89,10 +89,10 @@ func (Sort) Execute(aerc *widgets.Aerc, args []string) error {
}
}
- acct.SetStatus(statusline.Sorting(true))
+ acct.SetStatus(state.Sorting(true))
store.Sort(sortCriteria, func(msg types.WorkerMessage) {
if _, ok := msg.(*types.Done); ok {
- acct.SetStatus(statusline.Sorting(false))
+ acct.SetStatus(state.Sorting(false))
}
})
return nil