summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-03 01:51:16 -0600
committerJeff Carr <[email protected]>2025-03-03 01:51:16 -0600
commit65cf744a8643d63780fed3fc2f60cbe289f54cac (patch)
tree0ac839eb1fa66a33788f260ddb30ea75d7a2e5ab /init.go
parentcaf7428ba314cdbc542630b6e4d6c311a99293cb (diff)
cleaner libnotifyUpdate()
Diffstat (limited to 'init.go')
-rw-r--r--init.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/init.go b/init.go
index 0a37d65..65653b2 100644
--- a/init.go
+++ b/init.go
@@ -338,28 +338,11 @@ func refreshGocui() {
if me.mouse.mouseUp {
// log.Info("refresh now on mouseUp")
// todo: add logic here to see if the application has changed anything
- // me.baseGui.UpdateAsync(testRefresh) // probably don't need this
- me.baseGui.Update(testRefresh)
- if me.notify.clock.tk != nil {
- // also double check the gocui view exists
- if me.notify.clock.tk.v != nil {
- me.notify.clock.tk.v.Clear()
- me.notify.clock.tk.labelN = time.Now().Format("15:04:05")
- me.notify.clock.tk.v.WriteString(me.notify.clock.tk.labelN)
- }
- }
+ libNotifyUpdate()
lastRefresh = time.Now()
} else {
- me.baseGui.Update(testRefresh)
if time.Since(lastRefresh) > 3*time.Second {
- if me.notify.clock.tk != nil && !me.showHelp {
- // also double check the gocui view exists
- if me.notify.clock.tk.v != nil {
- me.notify.clock.tk.v.Clear()
- me.notify.clock.tk.labelN = time.Now().Format("15:04:05")
- me.notify.clock.tk.v.WriteString(me.notify.clock.tk.labelN)
- }
- }
+ libNotifyUpdate()
lastRefresh = time.Now()
}
}