From 29316a528aa04439d4a58e28e47bd61f0f99d35c Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 28 Mar 2020 11:32:31 +1100 Subject: [PATCH] better documentation --- pkg/gui/view_helpers.go | 7 ++++--- 1 file 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 {