mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Faster start by having async initial refresh
This commit is contained in:
committed by
Chris Cummer
parent
f1590e29f8
commit
1404140b82
@@ -13,6 +13,9 @@ func Schedule(widget Scheduler) {
|
||||
tick := time.NewTicker(time.Duration(widget.RefreshInterval()) * time.Second)
|
||||
quit := make(chan struct{})
|
||||
|
||||
// Kick off the first refresh and then leave the rest to the timer
|
||||
widget.Refresh()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-tick.C:
|
||||
|
||||
Reference in New Issue
Block a user