mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'master' of github.com:BillKeenan/wtf
This commit is contained in:
commit
606c824a28
@ -62,28 +62,9 @@ func (widget *Widget) Refresh() {
|
||||
return
|
||||
}
|
||||
|
||||
if started == false {
|
||||
// this code should run once
|
||||
go func() {
|
||||
for {
|
||||
time.Sleep(time.Duration(widget.updateInterval) * time.Second)
|
||||
}
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
started = true
|
||||
|
||||
widget.UpdateRefreshedAt()
|
||||
widget.View.Clear()
|
||||
|
||||
if !ok {
|
||||
widget.View.SetText(
|
||||
fmt.Sprint("Error!"),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
display(widget)
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user