aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/account/compose.go3
-rw-r--r--commands/account/next-result.go5
-rw-r--r--commands/account/next.go5
-rw-r--r--commands/account/recover.go3
-rw-r--r--commands/account/search.go3
-rw-r--r--commands/msg/archive.go3
-rw-r--r--commands/msg/delete.go3
-rw-r--r--commands/msg/forward.go3
-rw-r--r--commands/msg/invite.go3
-rw-r--r--commands/msg/recall.go3
-rw-r--r--commands/msg/reply.go3
-rw-r--r--commands/msg/toggle-threads.go3
-rw-r--r--commands/msg/unsubscribe.go3
-rw-r--r--commands/term.go3
14 files changed, 30 insertions, 16 deletions
diff --git a/commands/account/compose.go b/commands/account/compose.go
index fc7617ec..16474b4c 100644
--- a/commands/account/compose.go
+++ b/commands/account/compose.go
@@ -10,6 +10,7 @@ import (
"github.com/emersion/go-message/mail"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -64,7 +65,7 @@ func (Compose) Execute(aerc *widgets.Aerc, args []string) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
go func() {
defer logging.PanicHandler()
diff --git a/commands/account/next-result.go b/commands/account/next-result.go
index daa7af3c..922f95a1 100644
--- a/commands/account/next-result.go
+++ b/commands/account/next-result.go
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -34,13 +35,13 @@ func (NextPrevResult) Execute(aerc *widgets.Aerc, args []string) error {
if store != nil {
store.PrevResult()
}
- acct.Messages().Invalidate()
+ ui.Invalidate()
} else {
store := acct.Store()
if store != nil {
store.NextResult()
}
- acct.Messages().Invalidate()
+ ui.Invalidate()
}
return nil
}
diff --git a/commands/account/next.go b/commands/account/next.go
index c9c26809..15dc5363 100644
--- a/commands/account/next.go
+++ b/commands/account/next.go
@@ -6,6 +6,7 @@ import (
"strconv"
"strings"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -65,13 +66,13 @@ func ExecuteNextPrevMessage(args []string, acct *widgets.AccountView, pct bool,
store := acct.Store()
if store != nil {
store.NextPrev(-n)
- acct.Messages().Invalidate()
+ ui.Invalidate()
}
} else {
store := acct.Store()
if store != nil {
store.NextPrev(n)
- acct.Messages().Invalidate()
+ ui.Invalidate()
}
}
return nil
diff --git a/commands/account/recover.go b/commands/account/recover.go
index 682a99c5..b8acd261 100644
--- a/commands/account/recover.go
+++ b/commands/account/recover.go
@@ -8,6 +8,7 @@ import (
"path/filepath"
"git.sr.ht/~rjarry/aerc/commands"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -110,7 +111,7 @@ func (Recover) Execute(aerc *widgets.Aerc, args []string) error {
tab := aerc.NewTab(composer, "Recovered")
composer.OnHeaderChange("Subject", func(subject string) {
tab.Name = subject
- tab.Content.Invalidate()
+ ui.Invalidate()
})
go func() {
defer logging.PanicHandler()
diff --git a/commands/account/search.go b/commands/account/search.go
index 82099249..b4942bf5 100644
--- a/commands/account/search.go
+++ b/commands/account/search.go
@@ -5,6 +5,7 @@ import (
"strings"
"git.sr.ht/~rjarry/aerc/lib/statusline"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/widgets"
"git.sr.ht/~rjarry/aerc/worker/types"
@@ -54,7 +55,7 @@ func (SearchFilter) Execute(aerc *widgets.Aerc, args []string) error {
logging.Infof("Search results: %v", uids)
store.ApplySearch(uids)
// TODO: Remove when stores have multiple OnUpdate handlers
- acct.Messages().Invalidate()
+ ui.Invalidate()
}
store.Search(args, cb)
}
diff --git a/commands/msg/archive.go b/commands/msg/archive.go
index d485fd3d..beba3a63 100644
--- a/commands/msg/archive.go
+++ b/commands/msg/archive.go
@@ -9,6 +9,7 @@ import (
"git.sr.ht/~rjarry/aerc/commands"
"git.sr.ht/~rjarry/aerc/lib"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -117,7 +118,7 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
if next == nil {
aerc.RemoveTab(h.msgProvider)
acct.Messages().Select(-1)
- acct.Messages().Invalidate()
+ ui.Invalidate()
return
}
lib.NewMessageStoreView(next, mv.MessageView().SeenFlagSet(),
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index a3d024a7..066476d8 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -5,6 +5,7 @@ import (
"time"
"git.sr.ht/~rjarry/aerc/lib"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
"git.sr.ht/~rjarry/aerc/worker/types"
@@ -60,7 +61,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
if next == nil {
aerc.RemoveTab(h.msgProvider)
acct.Messages().Select(-1)
- acct.Messages().Invalidate()
+ ui.Invalidate()
return
}
lib.NewMessageStoreView(next, mv.MessageView().SeenFlagSet(),
diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index 6f59a1bb..4adfd128 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -14,6 +14,7 @@ import (
"git.sr.ht/~rjarry/aerc/lib"
"git.sr.ht/~rjarry/aerc/lib/format"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -117,7 +118,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
return composer, nil
}
diff --git a/commands/msg/invite.go b/commands/msg/invite.go
index 4e8d01dd..37a194a6 100644
--- a/commands/msg/invite.go
+++ b/commands/msg/invite.go
@@ -8,6 +8,7 @@ import (
"git.sr.ht/~rjarry/aerc/lib"
"git.sr.ht/~rjarry/aerc/lib/calendar"
"git.sr.ht/~rjarry/aerc/lib/format"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -167,7 +168,7 @@ func (invite) Execute(aerc *widgets.Aerc, args []string) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
composer.OnClose(func(c *widgets.Composer) {
diff --git a/commands/msg/recall.go b/commands/msg/recall.go
index 52d4ee89..c5585b05 100644
--- a/commands/msg/recall.go
+++ b/commands/msg/recall.go
@@ -13,6 +13,7 @@ import (
"github.com/pkg/errors"
"git.sr.ht/~rjarry/aerc/lib"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -93,7 +94,7 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
composer.OnClose(func(composer *widgets.Composer) {
worker := composer.Worker()
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index e5f8d478..1baef838 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -13,6 +13,7 @@ import (
"git.sr.ht/~rjarry/aerc/lib"
"git.sr.ht/~rjarry/aerc/lib/crypto"
"git.sr.ht/~rjarry/aerc/lib/format"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -194,7 +195,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
composer.OnClose(func(c *widgets.Composer) {
diff --git a/commands/msg/toggle-threads.go b/commands/msg/toggle-threads.go
index af694bc0..babdc31c 100644
--- a/commands/msg/toggle-threads.go
+++ b/commands/msg/toggle-threads.go
@@ -4,6 +4,7 @@ import (
"errors"
"git.sr.ht/~rjarry/aerc/lib/statusline"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -36,6 +37,6 @@ func (ToggleThreads) Execute(aerc *widgets.Aerc, args []string) error {
}
store.SetThreadedView(!store.ThreadedView())
acct.SetStatus(statusline.Threading(store.ThreadedView()))
- acct.Messages().Invalidate()
+ ui.Invalidate()
return nil
}
diff --git a/commands/msg/unsubscribe.go b/commands/msg/unsubscribe.go
index a9116e9d..022135eb 100644
--- a/commands/msg/unsubscribe.go
+++ b/commands/msg/unsubscribe.go
@@ -9,6 +9,7 @@ import (
"time"
"git.sr.ht/~rjarry/aerc/lib"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -168,7 +169,7 @@ func unsubscribeMailto(aerc *widgets.Aerc, u *url.URL) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
composer.FocusTerminal()
return nil
diff --git a/commands/term.go b/commands/term.go
index 924f71c9..d6662fe1 100644
--- a/commands/term.go
+++ b/commands/term.go
@@ -5,6 +5,7 @@ import (
"github.com/riywo/loginshell"
+ "git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -41,7 +42,7 @@ func TermCore(aerc *widgets.Aerc, args []string) error {
title = args[1]
}
tab.Name = title
- tab.Content.Invalidate()
+ ui.Invalidate()
}
term.OnClose = func(err error) {
aerc.RemoveTab(term)