aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKarel Balej <balejk@matfyz.cz>2024-05-07 13:23:59 +0200
committerRobin Jarry <robin@jarry.cc>2024-05-09 22:10:57 +0200
commit4c0211c4f9a7fad18f8ce97535e785fb5013b1f0 (patch)
treec9fa09d26ef6d4fcc63521e78eb43d0fcf99f390 /app
parent7b4c8f67eb5f8e3e943d72a78bdeb4194a68c61e (diff)
downloadaerc-4c0211c4f9a7fad18f8ce97535e785fb5013b1f0.tar.gz
aerc-4c0211c4f9a7fad18f8ce97535e785fb5013b1f0.zip
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 <balejk@matfyz.cz> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r--app/aerc.go8
1 files changed, 3 insertions, 5 deletions
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) {