From 43c98cb8198b1d402f8b43c7623ea15c8771b5d0 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 13 Feb 2025 20:47:40 -0600 Subject: [PATCH] disable gocui disable() --- windowRepos.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/windowRepos.go b/windowRepos.go index 1360ba8..dbbeba6 100644 --- a/windowRepos.go +++ b/windowRepos.go @@ -24,10 +24,22 @@ type repoWindow struct { } func (r *repoWindow) Hidden() bool { + if r == nil { + return true + } + if r.win == nil { + return true + } return r.win.Hidden() } func (r *repoWindow) Show() { + if r == nil { + return + } + if r.win == nil { + return + } r.win.Show() now := time.Now() @@ -64,14 +76,32 @@ func (r *repoWindow) Show() { } func (r *repoWindow) Hide() { + if r == nil { + return + } + if r.win == nil { + return + } r.win.Hide() } func (r *repoWindow) Disable() { + if r == nil { + return + } + if r.box == nil { + return + } r.box.Disable() } func (r *repoWindow) Enable() { + if r == nil { + return + } + if r.box == nil { + return + } r.box.Enable() }