summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/local_commits_controller.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-31 22:11:34 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit2a1e3faa0c61cc8c2418310089485dbab268228f (patch)
tree742988b455946b12a84adccb950b8df5a631417b /pkg/gui/controllers/local_commits_controller.go
parenteb056576cfe7d97503ef1baf3e1730c87d63976f (diff)
resetting controllers on new repo
Diffstat (limited to 'pkg/gui/controllers/local_commits_controller.go')
-rw-r--r--pkg/gui/controllers/local_commits_controller.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go
index 3e30619be..bc25411bf 100644
--- a/pkg/gui/controllers/local_commits_controller.go
+++ b/pkg/gui/controllers/local_commits_controller.go
@@ -20,7 +20,6 @@ type (
GetHostingServiceMgrFn func() *hosting_service.HostingServiceMgr
PullFilesFn func() error
CheckMergeOrRebase func(error) error
- OpenSearchFn func(viewName string) error
)
type LocalCommitsController struct {
@@ -40,7 +39,6 @@ type LocalCommitsController struct {
pullFiles PullFilesFn
getHostingServiceMgr GetHostingServiceMgrFn
switchToCommitFilesContext SwitchToCommitFilesContextFn
- openSearch OpenSearchFn
getLimitCommits func() bool
setLimitCommits func(bool)
getShowWholeGitGraph func() bool
@@ -65,7 +63,6 @@ func NewLocalCommitsController(
pullFiles PullFilesFn,
getHostingServiceMgr GetHostingServiceMgrFn,
switchToCommitFilesContext SwitchToCommitFilesContextFn,
- openSearch OpenSearchFn,
getLimitCommits func() bool,
setLimitCommits func(bool),
getShowWholeGitGraph func() bool,
@@ -87,7 +84,6 @@ func NewLocalCommitsController(
pullFiles: pullFiles,
getHostingServiceMgr: getHostingServiceMgr,
switchToCommitFilesContext: switchToCommitFilesContext,
- openSearch: openSearch,
getLimitCommits: getLimitCommits,
setLimitCommits: setLimitCommits,
getShowWholeGitGraph: getShowWholeGitGraph,
@@ -191,7 +187,7 @@ func (self *LocalCommitsController) Keybindings(
// more commits on demand
{
Key: getKey(config.Universal.StartSearch),
- Handler: func() error { return self.handleOpenSearch("commits") },
+ Handler: self.openSearch,
Description: self.c.Tr.LcStartSearch,
Tag: "navigation",
},
@@ -653,7 +649,7 @@ func (self *LocalCommitsController) handleCreateCommitResetMenu(commit *models.C
return self.refsHelper.CreateGitResetMenu(commit.Sha)
}
-func (self *LocalCommitsController) handleOpenSearch(string) error {
+func (self *LocalCommitsController) openSearch() error {
// we usually lazyload these commits but now that we're searching we need to load them now
if self.getLimitCommits() {
self.setLimitCommits(false)
@@ -662,7 +658,9 @@ func (self *LocalCommitsController) handleOpenSearch(string) error {
}
}
- return self.openSearch("commits")
+ self.c.OpenSearch()
+
+ return nil
}
func (self *LocalCommitsController) gotoBottom() error {