From 4c0211c4f9a7fad18f8ce97535e785fb5013b1f0 Mon Sep 17 00:00:00 2001 From: Karel Balej Date: Tue, 7 May 2024 13:23:59 +0200 Subject: app: make aerc satisfy the Beeper interface again During the Vaxis switchover, the Beeper interface was changed because Vaxis' Bell() function does not return error. However the corresponding change was not made on aerc making it not satisfy this interface and thus the DrawableInteractiveBeeper interface. This lead to the Bell function not getting registered making aerc unable to ring the terminal bell. Fix this. Fixes: 0fd5f4115792 ("ui: initialize vaxis directly, drop tcell.Screen initialization") Signed-off-by: Karel Balej Reviewed-by: Tim Culverhouse Acked-by: Robin Jarry --- app/aerc.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/aerc.go b/app/aerc.go index 667696f7..3f2c9b32 100644 --- a/app/aerc.go +++ b/app/aerc.go @@ -39,7 +39,7 @@ type Aerc struct { pendingKeys []config.KeyStroke prompts *ui.Stack tabs *ui.Tabs - beep func() error + beep func() dialog ui.DrawableInteractive Crypto crypto.Provider @@ -144,7 +144,7 @@ func (aerc *Aerc) showConfigWarnings() { callback("", nil) } -func (aerc *Aerc) OnBeep(f func() error) { +func (aerc *Aerc) OnBeep(f func()) { aerc.beep = f } @@ -153,9 +153,7 @@ func (aerc *Aerc) Beep() { log.Warnf("should beep, but no beeper") return } - if err := aerc.beep(); err != nil { - log.Errorf("tried to beep, but could not: %v", err) - } + aerc.beep() } func (aerc *Aerc) HandleMessage(msg types.WorkerMessage) { -- cgit