diff options
author | Robin Jarry <robin@jarry.cc> | 2023-10-10 00:36:02 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-10-11 10:21:56 +0200 |
commit | 1300b2c81bf96ca143ded90a7f6af130006a516b (patch) | |
tree | afb65be011e1c6bb454a3075313c36bb9110ac5b /app/aerc.go | |
parent | 34650131379a4542538da63751a89588d2f2cc85 (diff) | |
download | aerc-1300b2c81bf96ca143ded90a7f6af130006a516b.tar.gz |
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 <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'app/aerc.go')
-rw-r--r-- | app/aerc.go | 5 |
1 files changed, 0 insertions, 5 deletions
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() |