aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-10-07 11:00:31 -0500
committerRobin Jarry <robin@jarry.cc>2022-10-12 22:16:40 +0200
commitba24e92062f1a9b38065d503fd1dde749c27a56c (patch)
treed1a2981f8f9bda50a070b50c688388fe2130f770 /widgets/aerc.go
parent34014d3ceeebe8a9c131213fa56d1977fbc26b4a (diff)
downloadaerc-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 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go15
1 files changed, 3 insertions, 12 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index b396cf5e..56972771 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -152,14 +152,8 @@ func (aerc *Aerc) HandleMessage(msg types.WorkerMessage) {
}
}
-func (aerc *Aerc) OnInvalidate(onInvalidate func(d ui.Drawable)) {
- aerc.grid.OnInvalidate(func(_ ui.Drawable) {
- onInvalidate(aerc)
- })
-}
-
func (aerc *Aerc) Invalidate() {
- aerc.grid.Invalidate()
+ ui.Invalidate()
}
func (aerc *Aerc) Focus(focus bool) {
@@ -304,7 +298,7 @@ func (aerc *Aerc) Event(event tcell.Event) bool {
Key: event.Key(),
Rune: event.Rune(),
})
- aerc.statusline.Invalidate()
+ ui.Invalidate()
bindings := aerc.getBindings()
incomplete := false
result, strokes := bindings.GetBinding(aerc.pendingKeys)
@@ -724,7 +718,7 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
} else {
tab.Name = subject
}
- tab.Content.Invalidate()
+ ui.Invalidate()
})
return nil
}
@@ -775,9 +769,6 @@ func (aerc *Aerc) CloseBackends() error {
func (aerc *Aerc) AddDialog(d ui.DrawableInteractive) {
aerc.dialog = d
- aerc.dialog.OnInvalidate(func(_ ui.Drawable) {
- aerc.Invalidate()
- })
aerc.Invalidate()
}