diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index 67e6dc909..5c5e470b3 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -63,8 +63,6 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) error { ) } - wg := sync.WaitGroup{} - f := func() { var scopeSet *set.Set[types.RefreshableView] if len(options.Scope) == 0 { @@ -87,15 +85,11 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) error { } refresh := func(f func()) { - wg.Add(1) - func() { - if options.Mode == types.ASYNC { - self.c.OnWorker(f) - } else { - f() - } - wg.Done() - }() + if options.Mode == types.ASYNC { + self.c.OnWorker(f) + } else { + f() + } } if scopeSet.Includes(types.COMMITS) || scopeSet.Includes(types.BRANCHES) || scopeSet.Includes(types.REFLOG) || scopeSet.Includes(types.BISECT_INFO) { @@ -143,8 +137,6 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) error { refresh(func() { _ = self.mergeConflictsHelper.RefreshMergeState() }) } - wg.Wait() - self.refreshStatus() if options.Then != nil {