summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:32:31 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:59:45 +1100
commit29316a528aa04439d4a58e28e47bd61f0f99d35c (patch)
tree2edf2d6e1bd963ca27ad7cd387de93df72859593 /pkg/gui
parent036b53acf8234a719fa8e4652527d4781652e050 (diff)
better documentation
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/view_helpers.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index 50c40ede3..a236f2bb0 100644
--- a/pkg/gui/view_helpers.go
+++ b/pkg/gui/view_helpers.go
@@ -14,6 +14,7 @@ import (
var cyclableViews = []string{"status", "files", "branches", "commits", "stash"}
+// models/views that we can refresh
const (
COMMITS = iota
BRANCHES
@@ -33,13 +34,13 @@ const (
type refreshOptions struct {
then func()
- scope []int
- mode int
+ scope []int // e.g. []int{COMMITS, BRANCHES}. Leave empty to refresh everything
+ mode int // one of SYNC (default), ASYNC, and BLOCK_UI
}
type innerRefreshOptions struct {
scopeMap map[int]bool
- mode int
+ mode int // one of SYNC (default), ASYNC, and BLOCK_UI
}
func intArrToMap(arr []int) map[int]bool {