diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-07-03 10:11:12 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-07-03 21:32:18 +0200 |
commit | d45c07eb6a0955a24efec7bd915ba19746042778 (patch) | |
tree | dc8fdd2ad6e7a99a9af458235bffc3071254fdfa /widgets/aerc.go | |
parent | 12e8217d1fa0f4c4c83eebcc7473ecb8f0c072ba (diff) | |
download | aerc-d45c07eb6a0955a24efec7bd915ba19746042778.zip |
uiconfig: use pointer references to uiConfig
This patch changes references to uiConfig in function signatures and
structs to be pointers.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r-- | widgets/aerc.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 53d5944..3621201 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -95,7 +95,7 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, } else { aerc.accounts[acct.Name] = view conf := view.UiConfig() - tabs.Add(view, acct.Name, &conf) + tabs.Add(view, acct.Name, conf) } } @@ -325,10 +325,10 @@ func (aerc *Aerc) account(d ui.Drawable) *AccountView { return nil } -func (aerc *Aerc) SelectedAccountUiConfig() config.UIConfig { +func (aerc *Aerc) SelectedAccountUiConfig() *config.UIConfig { acct := aerc.SelectedAccount() if acct == nil { - return aerc.conf.Ui + return &aerc.conf.Ui } return acct.UiConfig() } @@ -349,7 +349,7 @@ func (aerc *Aerc) NewTab(clickable ui.Drawable, name string) *ui.Tab { var uiConf *config.UIConfig = nil if acct := aerc.account(clickable); acct != nil { conf := acct.UiConfig() - uiConf = &conf + uiConf = conf } tab := aerc.tabs.Add(clickable, name, uiConf) aerc.tabs.Select(len(aerc.tabs.Tabs) - 1) |