From ba24e92062f1a9b38065d503fd1dde749c27a56c Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 7 Oct 2022 11:00:31 -0500 Subject: invalidatable: cleanup dead code Remove invalidatable type and all associated calls. All items can directly invalidate the UI. Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- widgets/aerc.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'widgets/aerc.go') 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() } -- cgit