summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/controllers/helpers')
-rw-r--r--pkg/gui/controllers/helpers/app_status_helper.go6
-rw-r--r--pkg/gui/controllers/helpers/cherry_pick_helper.go2
-rw-r--r--pkg/gui/controllers/helpers/gpg_helper.go2
-rw-r--r--pkg/gui/controllers/helpers/refresh_helper.go4
-rw-r--r--pkg/gui/controllers/helpers/refs_helper.go2
-rw-r--r--pkg/gui/controllers/helpers/suggestions_helper.go2
-rw-r--r--pkg/gui/controllers/helpers/update_helper.go4
7 files changed, 11 insertions, 11 deletions
diff --git a/pkg/gui/controllers/helpers/app_status_helper.go b/pkg/gui/controllers/helpers/app_status_helper.go
index e271e1999..e3b6931ad 100644
--- a/pkg/gui/controllers/helpers/app_status_helper.go
+++ b/pkg/gui/controllers/helpers/app_status_helper.go
@@ -27,8 +27,8 @@ func (self *AppStatusHelper) Toast(message string) {
}
// withWaitingStatus wraps a function and shows a waiting status while the function is still executing
-func (self *AppStatusHelper) WithWaitingStatus(message string, f func(*gocui.Task) error) {
- self.c.OnWorker(func(task *gocui.Task) {
+func (self *AppStatusHelper) WithWaitingStatus(message string, f func(gocui.Task) error) {
+ self.c.OnWorker(func(task gocui.Task) {
self.statusMgr().WithWaitingStatus(message, func() {
self.renderAppStatus()
@@ -50,7 +50,7 @@ func (self *AppStatusHelper) GetStatusString() string {
}
func (self *AppStatusHelper) renderAppStatus() {
- self.c.OnWorker(func(_ *gocui.Task) {
+ self.c.OnWorker(func(_ gocui.Task) {
ticker := time.NewTicker(time.Millisecond * 50)
defer ticker.Stop()
for range ticker.C {
diff --git a/pkg/gui/controllers/helpers/cherry_pick_helper.go b/pkg/gui/controllers/helpers/cherry_pick_helper.go
index 9797b3ef3..2e8a11f7d 100644
--- a/pkg/gui/controllers/helpers/cherry_pick_helper.go
+++ b/pkg/gui/controllers/helpers/cherry_pick_helper.go
@@ -76,7 +76,7 @@ func (self *CherryPickHelper) Paste() error {
Title: self.c.Tr.CherryPick,
Prompt: self.c.Tr.SureCherryPick,
HandleConfirm: func() error {
- return self.c.WithWaitingStatus(self.c.Tr.CherryPickingStatus, func(*gocui.Task) error {
+ return self.c.WithWaitingStatus(self.c.Tr.CherryPickingStatus, func(gocui.Task) error {
self.c.LogAction(self.c.Tr.Actions.CherryPick)
err := self.c.Git().Rebase.CherryPickCommits(self.getData().CherryPickedCommits)
return self.rebaseHelper.CheckMergeOrRebase(err)
diff --git a/pkg/gui/controllers/helpers/gpg_helper.go b/pkg/gui/controllers/helpers/gpg_helper.go
index c31e26c49..df440104b 100644
--- a/pkg/gui/controllers/helpers/gpg_helper.go
+++ b/pkg/gui/controllers/helpers/gpg_helper.go
@@ -42,7 +42,7 @@ func (self *GpgHelper) WithGpgHandling(cmdObj oscommands.ICmdObj, waitingStatus
}
func (self *GpgHelper) runAndStream(cmdObj oscommands.ICmdObj, waitingStatus string, onSuccess func() error) error {
- return self.c.WithWaitingStatus(waitingStatus, func(*gocui.Task) error {
+ return self.c.WithWaitingStatus(waitingStatus, func(gocui.Task) error {
if err := cmdObj.StreamOutput().Run(); err != nil {
_ = self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
return self.c.Error(
diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go
index 15fd84375..36b960c69 100644
--- a/pkg/gui/controllers/helpers/refresh_helper.go
+++ b/pkg/gui/controllers/helpers/refresh_helper.go
@@ -87,7 +87,7 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) error {
refresh := func(f func()) {
if options.Mode == types.ASYNC {
- self.c.OnWorker(func(t *gocui.Task) {
+ self.c.OnWorker(func(t gocui.Task) {
f()
})
} else {
@@ -201,7 +201,7 @@ func getModeName(mode types.RefreshMode) string {
func (self *RefreshHelper) refreshReflogCommitsConsideringStartup() {
switch self.c.State().GetRepoState().GetStartupStage() {
case types.INITIAL:
- self.c.OnWorker(func(_ *gocui.Task) {
+ self.c.OnWorker(func(_ gocui.Task) {
_ = self.refreshReflogCommits()
self.refreshBranches()
self.c.State().GetRepoState().SetStartupStage(types.COMPLETE)
diff --git a/pkg/gui/controllers/helpers/refs_helper.go b/pkg/gui/controllers/helpers/refs_helper.go
index c59cd023c..af3a0875f 100644
--- a/pkg/gui/controllers/helpers/refs_helper.go
+++ b/pkg/gui/controllers/helpers/refs_helper.go
@@ -51,7 +51,7 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions
self.c.Contexts().LocalCommits.SetLimitCommits(true)
}
- return self.c.WithWaitingStatus(waitingStatus, func(*gocui.Task) error {
+ return self.c.WithWaitingStatus(waitingStatus, func(gocui.Task) error {
if err := self.c.Git().Branch.Checkout(ref, cmdOptions); err != nil {
// note, this will only work for english-language git commands. If we force git to use english, and the error isn't this one, then the user will receive an english command they may not understand. I'm not sure what the best solution to this is. Running the command once in english and a second time in the native language is one option
diff --git a/pkg/gui/controllers/helpers/suggestions_helper.go b/pkg/gui/controllers/helpers/suggestions_helper.go
index fc3a7ff70..783576617 100644
--- a/pkg/gui/controllers/helpers/suggestions_helper.go
+++ b/pkg/gui/controllers/helpers/suggestions_helper.go
@@ -101,7 +101,7 @@ func (self *SuggestionsHelper) GetBranchNameSuggestionsFunc() func(string) []*ty
// Notably, unlike other suggestion functions we're not showing all the options
// if nothing has been typed because there'll be too much to display efficiently
func (self *SuggestionsHelper) GetFilePathSuggestionsFunc() func(string) []*types.Suggestion {
- _ = self.c.WithWaitingStatus(self.c.Tr.LoadingFileSuggestions, func(*gocui.Task) error {
+ _ = self.c.WithWaitingStatus(self.c.Tr.LoadingFileSuggestions, func(gocui.Task) error {
trie := patricia.NewTrie()
// load every non-gitignored file in the repo
ignore, err := gitignore.FromGit()
diff --git a/pkg/gui/controllers/helpers/update_helper.go b/pkg/gui/controllers/helpers/update_helper.go
index 20d55849d..36cb6558a 100644
--- a/pkg/gui/controllers/helpers/update_helper.go
+++ b/pkg/gui/controllers/helpers/update_helper.go
@@ -38,7 +38,7 @@ func (self *UpdateHelper) CheckForUpdateInBackground() {
}
func (self *UpdateHelper) CheckForUpdateInForeground() error {
- return self.c.WithWaitingStatus(self.c.Tr.CheckingForUpdates, func(*gocui.Task) error {
+ return self.c.WithWaitingStatus(self.c.Tr.CheckingForUpdates, func(gocui.Task) error {
self.updater.CheckForNewUpdate(func(newVersion string, err error) error {
if err != nil {
return self.c.Error(err)
@@ -54,7 +54,7 @@ func (self *UpdateHelper) CheckForUpdateInForeground() error {
}
func (self *UpdateHelper) startUpdating(newVersion string) {
- _ = self.c.WithWaitingStatus(self.c.Tr.UpdateInProgressWaitingStatus, func(*gocui.Task) error {
+ _ = self.c.WithWaitingStatus(self.c.Tr.UpdateInProgressWaitingStatus, func(gocui.Task) error {
self.c.State().SetUpdating(true)
err := self.updater.Update(newVersion)
return self.onUpdateFinish(err)