1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-09 09:22:48 +03:00

Un-deprecate UserConfig.Git.Log.Order and ShowGraph

And remove them from AppState.
This commit is contained in:
Stefan Haller
2025-07-07 17:14:55 +02:00
parent 703256e92d
commit 562a2aaa6b
28 changed files with 46 additions and 59 deletions

View File

@@ -1182,11 +1182,10 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
Label: self.c.Tr.ShowGitGraph,
OpensMenu: true,
OnPress: func() error {
currentValue := self.c.GetAppState().GitLogShowGraph
currentValue := self.c.UserConfig().Git.Log.ShowGraph
onPress := func(value string) func() error {
return func() error {
self.c.GetAppState().GitLogShowGraph = value
self.c.SaveAppStateAndLogError()
self.c.UserConfig().Git.Log.ShowGraph = value
self.c.PostRefreshUpdate(self.c.Contexts().LocalCommits)
self.c.PostRefreshUpdate(self.c.Contexts().SubCommits)
return nil
@@ -1218,11 +1217,10 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
Label: self.c.Tr.SortCommits,
OpensMenu: true,
OnPress: func() error {
currentValue := self.c.GetAppState().GitLogOrder
currentValue := self.c.UserConfig().Git.Log.Order
onPress := func(value string) func() error {
return func() error {
self.c.GetAppState().GitLogOrder = value
self.c.SaveAppStateAndLogError()
self.c.UserConfig().Git.Log.Order = value
return self.c.WithWaitingStatus(self.c.Tr.LoadingCommits, func(gocui.Task) error {
self.c.Refresh(
types.RefreshOptions{