diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-04-25 08:30:43 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-04-27 09:46:11 +0200 |
commit | d09636ee0b9957ed60fc01224ddfbb03c4f4b7fa (patch) | |
tree | 5f0ec8c9ad11a0f638c25dbd896a518e983dc779 /widgets/aerc.go | |
parent | afe35839eddfaf43be0f791e97a926a15d91fc02 (diff) | |
download | aerc-d09636ee0b9957ed60fc01224ddfbb03c4f4b7fa.tar.gz |
refactor: refactor pgp implementation
This commit refactors the internal PGP implementation to make way for
GPG integration.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r-- | widgets/aerc.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 717547dc..0b4e36dd 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -16,6 +16,7 @@ import ( "git.sr.ht/~rjarry/aerc/config" "git.sr.ht/~rjarry/aerc/lib" + "git.sr.ht/~rjarry/aerc/lib/crypto" "git.sr.ht/~rjarry/aerc/lib/ui" "git.sr.ht/~rjarry/aerc/models" ) @@ -38,6 +39,8 @@ type Aerc struct { ui *ui.UI beep func() error dialog ui.DrawableInteractive + + Crypto crypto.Provider } type Choice struct { @@ -47,9 +50,9 @@ type Choice struct { } func NewAerc(conf *config.AercConfig, logger *log.Logger, - cmd func(cmd []string) error, complete func(cmd string) []string, - cmdHistory lib.History, deferLoop chan struct{}, -) *Aerc { + crypto crypto.Provider, cmd func(cmd []string) error, + complete func(cmd string) []string, cmdHistory lib.History, + deferLoop chan struct{}) *Aerc { tabs := ui.NewTabs(&conf.Ui) statusbar := ui.NewStack(conf.Ui) @@ -79,6 +82,7 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, statusline: statusline, prompts: ui.NewStack(conf.Ui), tabs: tabs, + Crypto: crypto, } statusline.SetAerc(aerc) |