diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index aa24dde..7439e4c 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -24,6 +24,12 @@ func showHideRepos() { continue } } + if me.autoReleased.Checked() { + if repo.getGoSumStatus() == "RELEASED" { + repo.Hide() + continue + } + } repo.Show() } } @@ -83,6 +89,21 @@ func globalDisplayOptions(box *gui.Node) { } } + me.autoReleased = group1.NewCheckbox("Hide RELEASED repos").SetChecked(false) + me.autoReleased.Custom = func() { + if me.autoReleased.Checked() { + for _, repo := range me.allrepos { + if repo.getGoSumStatus() == "RELEASED" { + repo.Hide() + } + } + } else { + for _, repo := range me.allrepos { + repo.Show() + } + } + } + me.ignoreWhitelist = group1.NewCheckbox("ignore whitelist (are you sure?)").SetChecked(false) me.scanEveryMinute = group1.NewCheckbox("Scan every minute").SetChecked(false) diff --git a/structs.go b/structs.go index fe7ded2..f04acd6 100644 --- a/structs.go +++ b/structs.go @@ -28,6 +28,7 @@ type autoType struct { // #### autotypist Global Display Options autoHidePerfect *gui.Node autoHideReadOnly *gui.Node + autoReleased *gui.Node ignoreWhitelist *gui.Node // #### autotypist Global Build Options