1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-27 12:32:37 +02:00

Set custom author and branch colors and nerd font version after loading user config

This commit is contained in:
Stefan Haller 2024-07-27 21:59:55 +02:00
parent 4a272afc67
commit 65a2eccfdb

View File

@ -400,6 +400,14 @@ func (gui *Gui) onUserConfigLoaded() error {
// sake of backwards compatibility. We're making use of short circuiting here
gui.ShowExtrasWindow = userConfig.Gui.ShowCommandLog && !gui.c.GetAppState().HideCommandLog
authors.SetCustomAuthors(userConfig.Gui.AuthorColors)
if userConfig.Gui.NerdFontsVersion != "" {
icons.SetNerdFontsVersion(userConfig.Gui.NerdFontsVersion)
} else if userConfig.Gui.ShowIcons {
icons.SetNerdFontsVersion("2")
}
presentation.SetCustomBranches(userConfig.Gui.BranchColors)
return nil
}
@ -599,14 +607,6 @@ func NewGui(
// TODO: reset these controllers upon changing repos due to state changing
gui.c = helperCommon
authors.SetCustomAuthors(gui.UserConfig().Gui.AuthorColors)
if gui.UserConfig().Gui.NerdFontsVersion != "" {
icons.SetNerdFontsVersion(gui.UserConfig().Gui.NerdFontsVersion)
} else if gui.UserConfig().Gui.ShowIcons {
icons.SetNerdFontsVersion("2")
}
presentation.SetCustomBranches(gui.UserConfig().Gui.BranchColors)
gui.BackgroundRoutineMgr = &BackgroundRoutineMgr{gui: gui}
gui.stateAccessor = &StateAccessor{gui: gui}