From 1300b2c81bf96ca143ded90a7f6af130006a516b Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Tue, 10 Oct 2023 00:36:02 +0200 Subject: ui: export global functions There is no need for an UI object. The Aerc.ui field is unused. And there is a single instance of it anyway. Move the object's public fields as global variables and change methods to public functions. This makes the code cleaner and removes boilerplate. Signed-off-by: Robin Jarry Acked-by: Moritz Poldrack --- app/aerc.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'app/aerc.go') diff --git a/app/aerc.go b/app/aerc.go index 21430f80..dbde484f 100644 --- a/app/aerc.go +++ b/app/aerc.go @@ -38,7 +38,6 @@ type Aerc struct { pendingKeys []config.KeyStroke prompts *ui.Stack tabs *ui.Tabs - ui *ui.UI beep func() error dialog ui.DrawableInteractive @@ -832,10 +831,6 @@ func (aerc *Aerc) GetPassword(title string, prompt string) (chText chan string, return } -func (aerc *Aerc) Initialize(ui *ui.UI) { - aerc.ui = ui -} - func (aerc *Aerc) DecryptKeys(keys []openpgp.Key, symmetric bool) (b []byte, err error) { for _, key := range keys { ident := key.Entity.PrimaryIdentity() -- cgit