diff options
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 982ecae1e..93476636c 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -497,6 +497,7 @@ func (gui *Gui) resetControllers() { rebaseHelper := helpers.NewMergeAndRebaseHelper(controllerCommon, gui.State.Contexts, gui.git, gui.takeOverMergeConflictScrolling, refsHelper) gui.helpers = &helpers.Helpers{ Refs: refsHelper, + PatchBuilding: helpers.NewPatchBuildingHelper(controllerCommon, gui.git), Bisect: helpers.NewBisectHelper(controllerCommon, gui.git), Suggestions: helpers.NewSuggestionsHelper(controllerCommon, model, gui.refreshSuggestions), Files: helpers.NewFilesHelper(controllerCommon, gui.git, osCommand), @@ -534,8 +535,8 @@ func (gui *Gui) resetControllers() { bisectController := controllers.NewBisectController(common) - reflogController := controllers.NewReflogController(common, gui.SwitchToCommitFilesContext) - subCommitsController := controllers.NewSubCommitsController(common, gui.SwitchToCommitFilesContext) + reflogController := controllers.NewReflogController(common) + subCommitsController := controllers.NewSubCommitsController(common) gui.Controllers = Controllers{ Submodules: submodulesController, @@ -548,12 +549,8 @@ func (gui *Gui) resetControllers() { func() string { return gui.State.failedCommitMessage }, gui.switchToMerge, ), - Tags: controllers.NewTagsController(common), - LocalCommits: controllers.NewLocalCommitsController( - common, - syncController.HandlePull, - gui.SwitchToCommitFilesContext, - ), + Tags: controllers.NewTagsController(common), + LocalCommits: controllers.NewLocalCommitsController(common, syncController.HandlePull), Remotes: controllers.NewRemotesController( common, func(branches []*models.RemoteBranch) { gui.State.Model.RemoteBranches = branches }, @@ -567,6 +564,7 @@ func (gui *Gui) resetControllers() { gitFlowController := controllers.NewGitFlowController(common) filesRemoveController := controllers.NewFilesRemoveController(common) stashController := controllers.NewStashController(common) + commitFilesController := controllers.NewCommitFilesController(common) switchToSubCommitsControllerFactory := controllers.NewSubCommitsSwitchControllerFactory( common, @@ -602,6 +600,7 @@ func (gui *Gui) resetControllers() { controllers.AttachControllers(gui.State.Contexts.LocalCommits, gui.Controllers.LocalCommits, bisectController) controllers.AttachControllers(gui.State.Contexts.ReflogCommits, reflogController) controllers.AttachControllers(gui.State.Contexts.SubCommits, subCommitsController) + controllers.AttachControllers(gui.State.Contexts.CommitFiles, commitFilesController) controllers.AttachControllers(gui.State.Contexts.Remotes, gui.Controllers.Remotes) controllers.AttachControllers(gui.State.Contexts.Stash, stashController) controllers.AttachControllers(gui.State.Contexts.Menu, gui.Controllers.Menu) |