diff --git a/pkg/gui/controllers.go b/pkg/gui/controllers.go index b0f100f2f..8e28e7f6e 100644 --- a/pkg/gui/controllers.go +++ b/pkg/gui/controllers.go @@ -131,7 +131,7 @@ func (gui *Gui) resetControllers() { setSubCommits := func(commits []*models.Commit) { gui.State.Model.SubCommits = commits } - for _, context := range []controllers.ContextWithRefName{ + for _, context := range []controllers.CanSwitchToSubCommits{ gui.State.Contexts.Branches, gui.State.Contexts.RemoteBranches, gui.State.Contexts.Tags, diff --git a/pkg/gui/controllers/switch_to_sub_commits_controller.go b/pkg/gui/controllers/switch_to_sub_commits_controller.go index f7e9f6702..abd8642d3 100644 --- a/pkg/gui/controllers/switch_to_sub_commits_controller.go +++ b/pkg/gui/controllers/switch_to_sub_commits_controller.go @@ -8,7 +8,7 @@ import ( var _ types.IController = &SwitchToSubCommitsController{} -type ContextWithRefName interface { +type CanSwitchToSubCommits interface { types.Context GetSelectedRefName() string } @@ -16,7 +16,7 @@ type ContextWithRefName interface { type SwitchToSubCommitsController struct { baseController *controllerCommon - context ContextWithRefName + context CanSwitchToSubCommits setSubCommits func([]*models.Commit) } @@ -24,7 +24,7 @@ type SwitchToSubCommitsController struct { func NewSwitchToSubCommitsController( controllerCommon *controllerCommon, setSubCommits func([]*models.Commit), - context ContextWithRefName, + context CanSwitchToSubCommits, ) *SwitchToSubCommitsController { return &SwitchToSubCommitsController{ baseController: baseController{},