diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-12-29 12:03:35 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 09:07:15 +1100 |
commit | 192a548c9957807d9d5c9c4700dffe02c1f55f03 (patch) | |
tree | 7627ded8fc1fccfcb2442cbfaf8009eb55e2c07f /pkg/gui/gui.go | |
parent | 01ea5813a8e3b8e914332002e744e3328f55f6cd (diff) |
refactoring the config struct
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 243af8b84..6ee63e34c 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -432,6 +432,7 @@ func (gui *Gui) resetState(filterPath string, reuseState bool) { // for now the split view will always be on // NewGui builds a new gui handler func NewGui(cmn *common.Common, gitCommand *commands.GitCommand, oSCommand *oscommands.OSCommand, config config.AppConfigurer, updater *updates.Updater, filterPath string, showRecentRepos bool) (*Gui, error) { + gui := &Gui{ Common: cmn, GitCommand: gitCommand, @@ -444,8 +445,12 @@ func NewGui(cmn *common.Common, gitCommand *commands.GitCommand, oSCommand *osco RepoPathStack: []string{}, RepoStateMap: map[Repo]*guiState{}, CmdLog: []string{}, - ShowExtrasWindow: config.ShowCommandLogOnStartup(), suggestionsAsyncHandler: tasks.NewAsyncHandler(), + + // originally we could only hide the command log permanently via the config + // but now we do it via state. So we need to still support the config for the + // sake of backwards compatibility. We're making use of short circuiting here + ShowExtrasWindow: cmn.UserConfig.Gui.ShowCommandLog && !config.GetAppState().HideCommandLog, } gui.resetState(filterPath, false) |