aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account-wizard.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-10-07 11:00:31 -0500
committerRobin Jarry <robin@jarry.cc>2022-10-12 22:16:40 +0200
commitba24e92062f1a9b38065d503fd1dde749c27a56c (patch)
treed1a2981f8f9bda50a070b50c688388fe2130f770 /widgets/account-wizard.go
parent34014d3ceeebe8a9c131213fa56d1977fbc26b4a (diff)
downloadaerc-ba24e92062f1a9b38065d503fd1dde749c27a56c.tar.gz
invalidatable: cleanup dead code
Remove invalidatable type and all associated calls. All items can directly invalidate the UI. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/account-wizard.go')
-rw-r--r--widgets/account-wizard.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go
index 4856c608..b6e0a5e4 100644
--- a/widgets/account-wizard.go
+++ b/widgets/account-wizard.go
@@ -40,7 +40,6 @@ const (
)
type AccountWizard struct {
- ui.Invalidatable
aerc *Aerc
conf *config.AercConfig
step int
@@ -224,9 +223,6 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
wizard.basics = []ui.Interactive{
wizard.accountName, wizard.fullName, wizard.email, selector,
}
- basics.OnInvalidate(func(_ ui.Drawable) {
- wizard.Invalidate()
- })
incoming := ui.NewGrid().Rows([]ui.GridSpec{
{Strategy: ui.SIZE_EXACT, Size: ui.Const(3)}, // Introduction
@@ -303,9 +299,6 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
wizard.imapUsername, wizard.imapPassword, wizard.imapServer,
imapMode, selector,
}
- incoming.OnInvalidate(func(_ ui.Drawable) {
- wizard.Invalidate()
- })
outgoing := ui.NewGrid().Rows([]ui.GridSpec{
{Strategy: ui.SIZE_EXACT, Size: ui.Const(3)}, // Introduction
@@ -399,9 +392,6 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
wizard.smtpUsername, wizard.smtpPassword, wizard.smtpServer,
smtpMode, copySent, selector,
}
- outgoing.OnInvalidate(func(_ ui.Drawable) {
- wizard.Invalidate()
- })
complete := ui.NewGrid().Rows([]ui.GridSpec{
{Strategy: ui.SIZE_EXACT, Size: ui.Const(7)}, // Introduction
@@ -431,9 +421,6 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
})
complete.AddChild(selector).At(1, 0)
wizard.complete = []ui.Interactive{selector}
- complete.OnInvalidate(func(_ ui.Drawable) {
- wizard.Invalidate()
- })
wizard.steps = []*ui.Grid{basics, incoming, outgoing, complete}
return wizard
@@ -665,7 +652,7 @@ func (wizard *AccountWizard) smtpUri() url.URL {
}
func (wizard *AccountWizard) Invalidate() {
- wizard.DoInvalidate(wizard)
+ ui.Invalidate()
}
func (wizard *AccountWizard) Draw(ctx *ui.Context) {