2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-10 13:10:26 +00:00

Table view nil check

This commit is contained in:
Miguel Mota 2021-02-22 22:37:25 -08:00
parent e0eaf60329
commit 38b279083f

View File

@ -67,7 +67,9 @@ func (ct *Cointop) RefreshTable() error {
ct.UpdateUI(func() error { ct.UpdateUI(func() error {
ct.Views.Table.Clear() ct.Views.Table.Clear()
if statusText == "" { if statusText == "" {
ct.table.Format().Fprint(ct.Views.Table.Backing()) if ct.Views.Table.HasBacking() {
ct.table.Format().Fprint(ct.Views.Table.Backing())
}
} else { } else {
ct.Views.Table.Update(fmt.Sprintf("\n\n%s", statusText)) ct.Views.Table.Update(fmt.Sprintf("\n\n%s", statusText))
} }