diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-10-07 11:00:31 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-10-12 22:16:40 +0200 |
commit | ba24e92062f1a9b38065d503fd1dde749c27a56c (patch) | |
tree | d1a2981f8f9bda50a070b50c688388fe2130f770 /commands/msg | |
parent | 34014d3ceeebe8a9c131213fa56d1977fbc26b4a (diff) | |
download | aerc-ba24e92062f1a9b38065d503fd1dde749c27a56c.tar.gz |
invalidatable: cleanup dead code
Remove invalidatable type and all associated calls. All items can
directly invalidate the UI.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/archive.go | 3 | ||||
-rw-r--r-- | commands/msg/delete.go | 3 | ||||
-rw-r--r-- | commands/msg/forward.go | 3 | ||||
-rw-r--r-- | commands/msg/invite.go | 3 | ||||
-rw-r--r-- | commands/msg/recall.go | 3 | ||||
-rw-r--r-- | commands/msg/reply.go | 3 | ||||
-rw-r--r-- | commands/msg/toggle-threads.go | 3 | ||||
-rw-r--r-- | commands/msg/unsubscribe.go | 3 |
8 files changed, 16 insertions, 8 deletions
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 |