You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cointop/cointop/update.go

21 lines
297 B
Go

package cointop
6 years ago
import (
"fmt"
"github.com/miguelmota/gocui"
6 years ago
)
// UpdateUI takes a callback which updates the view
func (ct *Cointop) UpdateUI(f func() error) {
ct.debuglog(fmt.Sprintf("UpdateUI()"))
5 years ago
if ct.g == nil {
return
5 years ago
}
ct.g.Update(func(g *gocui.Gui) error {
return f()
})
}