summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-12-29 12:03:35 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-04 09:07:15 +1100
commit192a548c9957807d9d5c9c4700dffe02c1f55f03 (patch)
tree7627ded8fc1fccfcb2442cbfaf8009eb55e2c07f /pkg/config
parent01ea5813a8e3b8e914332002e744e3328f55f6cd (diff)
refactoring the config struct
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/app_config.go18
1 files changed, 5 insertions, 13 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index 7ce467335..98620ad43 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -31,18 +31,21 @@ type AppConfig struct {
// from AppConfig and still be used by lazygit.
type AppConfigurer interface {
GetDebug() bool
+
+ // build info
GetVersion() string
GetCommit() string
GetBuildDate() string
GetName() string
GetBuildSource() string
+
GetUserConfig() *UserConfig
GetUserConfigPaths() []string
GetUserConfigDir() string
+ ReloadUserConfig() error
+
GetAppState() *AppState
SaveAppState() error
- ReloadUserConfig() error
- ShowCommandLogOnStartup() bool
}
// NewAppConfig makes a new app config
@@ -255,17 +258,6 @@ func (c *AppConfig) SaveAppState() error {
return err
}
-// 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
-func (c *AppConfig) ShowCommandLogOnStartup() bool {
- if !c.UserConfig.Gui.ShowCommandLog {
- return false
- }
-
- return !c.AppState.HideCommandLog
-}
-
// loadAppState loads recorded AppState from file
func loadAppState() (*AppState, error) {
filepath, err := configFilePath("state.yml")