summaryrefslogtreecommitdiffstats
path: root/pkg/gui/view_helpers.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-28 10:27:34 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:59:45 +1100
commitf7add8d788604743b334c72b784c487968b99867 (patch)
tree64c850b77954d15e5a2451ce4b6aa089cf578b11 /pkg/gui/view_helpers.go
parentd97c2307476253be353edc1ad85c2658c0f78ebe (diff)
smarter refreshing for tags and remotes
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r--pkg/gui/view_helpers.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index 60d548bcb..50c40ede3 100644
--- a/pkg/gui/view_helpers.go
+++ b/pkg/gui/view_helpers.go
@@ -61,7 +61,7 @@ func (gui *Gui) refreshSidePanels(options refreshOptions) error {
scopeMap = intArrToMap(options.scope)
}
- if scopeMap[COMMITS] || scopeMap[BRANCHES] || scopeMap[REFLOG] || scopeMap[TAGS] || scopeMap[REMOTES] {
+ if scopeMap[COMMITS] || scopeMap[BRANCHES] || scopeMap[REFLOG] {
wg.Add(1)
func() {
if options.mode == ASYNC {
@@ -97,8 +97,34 @@ func (gui *Gui) refreshSidePanels(options refreshOptions) error {
}()
}
+ if scopeMap[TAGS] {
+ wg.Add(1)
+ func() {
+ if options.mode == ASYNC {
+ go gui.refreshTags()
+ } else {
+ gui.refreshTags()
+ }
+ wg.Done()
+ }()
+ }
+
+ if scopeMap[REMOTES] {
+ wg.Add(1)
+ func() {
+ if options.mode == ASYNC {
+ go gui.refreshRemotes()
+ } else {
+ gui.refreshRemotes()
+ }
+ wg.Done()
+ }()
+ }
+
wg.Wait()
+ gui.refreshStatus()
+
if options.then != nil {
options.then()
}