From 303c603f36984f2ff783957f7eb71849024faae2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 22 Feb 2024 07:55:01 -0600 Subject: [PATCH] minor change --- globalDisplayOptions.go | 9 ++------- main.go | 4 ++++ repoview.go | 2 -- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index f4b4ee1..06e34f5 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -63,13 +63,8 @@ func globalDisplayOptions(vbox *gui.Node) { me.autoHidePerfect = group1.NewCheckbox("Hide Perfectly clean repos").SetChecked(true) me.autoHidePerfect.Custom = func() { - if me.autoHidePerfect.Checked() { - me.repos.View.RegisterHideFunction(hideFunction) - me.repos.View.ScanRepositories() - } else { - me.repos.View.RegisterHideFunction(hideFunction2) - me.repos.View.ScanRepositories() - } + me.repos.View.RegisterHideFunction(hideFunction) + me.repos.View.ScanRepositories() } scanbox := group1.Box().Horizontal() me.autoScanReposCB = scanbox.NewCheckbox("auto scan").SetChecked(true) diff --git a/main.go b/main.go index c8cf5f4..eb8a237 100644 --- a/main.go +++ b/main.go @@ -50,6 +50,10 @@ func main() { // may exit here handleCmdLine() + // setup the autoscan functions + me.repos.View.RegisterHideFunction(hideFunction) + me.repos.View.SetAutoScan(me.autoScanReposCB.Checked()) + // processing is done. update the repo summary box // me.summary.Update() diff --git a/repoview.go b/repoview.go index 3ba6988..a9e7a19 100644 --- a/repoview.go +++ b/repoview.go @@ -62,8 +62,6 @@ func makeRepoView() *repoWindow { r.topbox.Append(showncount) duration := r.View.MirrorScanDuration() r.topbox.Append(duration) - - r.View.RegisterHideFunction(hideFunction) return r }