aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 4ccb43d..bd47f46 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -37,7 +37,8 @@ func NewAccountView(conf *config.AercConfig, acct *config.AccountConfig,
worker, err := worker.NewWorker(acct.Source, logger)
if err != nil {
- host.SetStatus(fmt.Sprintf("%s: %s", acct.Name, err))
+ host.SetStatus(fmt.Sprintf("%s: %s", acct.Name, err)).
+ Color(tcell.ColorDefault, tcell.ColorRed)
return &AccountView{
acct: acct,
grid: grid,
@@ -74,6 +75,9 @@ func NewAccountView(conf *config.AercConfig, acct *config.AccountConfig,
}
func (acct *AccountView) Tick() bool {
+ if acct.worker == nil {
+ return false
+ }
select {
case msg := <-acct.worker.Messages:
msg = acct.worker.ProcessMessage(msg)