From 2b172338f61d0f0b003b5c8198b979b24d3b60ac Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 11 Feb 2024 18:56:55 -0600 Subject: [PATCH] don't track hidden in here Signed-off-by: Jeff Carr --- common.go | 6 +----- new.go | 2 -- structs.go | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/common.go b/common.go index 6ba0949..4174a82 100644 --- a/common.go +++ b/common.go @@ -21,8 +21,6 @@ func (rs *RepoStatus) Draw() { } log.Log(CHANGE, "Draw() window ready =", rs.ready) rs.window.TestDraw() - // rs.window.Draw() - rs.ready = true } func (rs *RepoStatus) Show() { @@ -31,7 +29,6 @@ func (rs *RepoStatus) Show() { } log.Log(CHANGE, "Show() window ready =", rs.ready) rs.window.Show() - rs.hidden = false } func (rs *RepoStatus) Hide() { @@ -40,7 +37,6 @@ func (rs *RepoStatus) Hide() { } log.Log(CHANGE, "Hide() window ready =", rs.ready) rs.window.Hide() - rs.hidden = true } func (rs *RepoStatus) Toggle() { @@ -48,7 +44,7 @@ func (rs *RepoStatus) Toggle() { return } log.Log(CHANGE, "Toggle() window ready =", rs.ready) - if rs.hidden { + if rs.window.Hidden() { rs.Show() } else { rs.Hide() diff --git a/new.go b/new.go index 528594d..215977f 100644 --- a/new.go +++ b/new.go @@ -71,7 +71,6 @@ func NewRepoStatusWindow(path string) *RepoStatus { func New(p *gui.Node, path string) *RepoStatus { rs := &RepoStatus{ - hidden: true, ready: false, parent: p, } @@ -81,7 +80,6 @@ func New(p *gui.Node, path string) *RepoStatus { rs.window.Make() rs.ready = true rs.window.Custom = func() { - // rs.hidden = true rs.Hide() log.Warn("repostatus user closed the window()") } diff --git a/structs.go b/structs.go index a21d92f..ade5e14 100644 --- a/structs.go +++ b/structs.go @@ -7,7 +7,6 @@ import ( type RepoStatus struct { ready bool - hidden bool changed bool // lasttagrev string