mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'master' into gcal-until-update
This commit is contained in:
commit
e22d3c4fe4
@ -49,6 +49,10 @@ func (widget *Widget) Disable() {
|
|||||||
/* -------------------- Unexported Functions -------------------- */
|
/* -------------------- Unexported Functions -------------------- */
|
||||||
|
|
||||||
func (widget *Widget) display() {
|
func (widget *Widget) display() {
|
||||||
|
if widget.events == nil || len(widget.events.Items) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
widget.mutex.Lock()
|
widget.mutex.Lock()
|
||||||
defer widget.mutex.Unlock()
|
defer widget.mutex.Unlock()
|
||||||
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(widget.events)))
|
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(widget.events)))
|
||||||
@ -287,9 +291,7 @@ outer:
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-tick.C:
|
case <-tick.C:
|
||||||
if widget.events != nil && len(widget.events.Items) > 0 {
|
widget.display()
|
||||||
widget.display()
|
|
||||||
}
|
|
||||||
case <-widget.ch:
|
case <-widget.ch:
|
||||||
break outer
|
break outer
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user