mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix cryptolive widget
Addresses #481 Inverts the item list return, to make sure we always trigger wg.Done and not hang the widget Clean up config for toplist widget, as we were assigning to `currencies` rather than `top` erroneously
This commit is contained in:
@@ -45,17 +45,14 @@ func (widget *Widget) setList() {
|
||||
|
||||
// Refresh & update after interval time
|
||||
func (widget *Widget) Refresh(wg *sync.WaitGroup) {
|
||||
if len(widget.list.items) == 0 {
|
||||
return
|
||||
if len(widget.list.items) != 0 {
|
||||
widget.updateCurrencies()
|
||||
if !ok {
|
||||
widget.Result = fmt.Sprint("Please check your internet connection!")
|
||||
} else {
|
||||
widget.display()
|
||||
}
|
||||
}
|
||||
|
||||
widget.updateCurrencies()
|
||||
|
||||
if !ok {
|
||||
widget.Result = fmt.Sprint("Please check your internet connection!")
|
||||
return
|
||||
}
|
||||
widget.display()
|
||||
wg.Done()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user