diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2023-02-10 21:44:15 +0900 |
---|---|---|
committer | Ryooooooga <eial5q265e5@gmail.com> | 2023-02-27 15:29:00 +0900 |
commit | a624e0457f419f353b57bf5e81955438fa4541fc (patch) | |
tree | a2238d4e08fd18901acf1992c480b08952d9bd7a /pkg/gui/controllers.go | |
parent | f2aa7e7e284c0634d30fd0c80e5421fb1e0dd13c (diff) |
feat(subcommits): load unlimited sub-commits
Diffstat (limited to 'pkg/gui/controllers.go')
-rw-r--r-- | pkg/gui/controllers.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/gui/controllers.go b/pkg/gui/controllers.go index d7f6647c7..80b7d9e80 100644 --- a/pkg/gui/controllers.go +++ b/pkg/gui/controllers.go @@ -133,7 +133,12 @@ func (gui *Gui) resetControllers() { patchBuildingController := controllers.NewPatchBuildingController(common) snakeController := controllers.NewSnakeController(common, func() *snake.Game { return gui.snakeGame }) - setSubCommits := func(commits []*models.Commit) { gui.State.Model.SubCommits = commits } + setSubCommits := func(commits []*models.Commit) { + gui.Mutexes.SubCommitsMutex.Lock() + defer gui.Mutexes.SubCommitsMutex.Unlock() + + gui.State.Model.SubCommits = commits + } for _, context := range []controllers.CanSwitchToSubCommits{ gui.State.Contexts.Branches, |