aboutsummaryrefslogtreecommitdiffstats
path: root/aerc.go
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2023-03-04 10:56:46 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-07 00:12:55 +0100
commitc6a08b1003a2cb02d86002541ead0f9b38db1beb (patch)
tree80dead95349d263b8bad20c17b6005b523367485 /aerc.go
parent4838efdb1d5a746432a30ef0b86b090aab52fa7a (diff)
downloadaerc-c6a08b1003a2cb02d86002541ead0f9b38db1beb.tar.gz
ipc: use an interface instead of a function list
Currently, every function has to be mapped to the according handler with our god-object. To make adding new handlers require less changes, change this mapping into an interface that is satisfied by *widgets.Aerc Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'aerc.go')
-rw-r--r--aerc.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/aerc.go b/aerc.go
index f4247ed5..49684c53 100644
--- a/aerc.go
+++ b/aerc.go
@@ -214,13 +214,11 @@ func main() {
ui.EnableMouse()
}
- as, err := ipc.StartServer()
+ as, err := ipc.StartServer(aerc)
if err != nil {
log.Warnf("Failed to start Unix server: %v", err)
} else {
defer as.Close()
- as.OnMailto = aerc.Mailto
- as.OnMbox = aerc.Mbox
}
// set the aerc version so that we can use it in the template funcs