From b9fc08e0983ca33f4f3fc7ab76c354272e312269 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Fri, 24 May 2019 14:27:29 -0700 Subject: [PATCH] Todoist only refreshes if it is not disabled and there is a current project --- modules/todoist/widget.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/todoist/widget.go b/modules/todoist/widget.go index 1b1039c1..9778eac7 100644 --- a/modules/todoist/widget.go +++ b/modules/todoist/widget.go @@ -54,13 +54,13 @@ func (widget *Widget) ProjectAt(idx int) *Project { } func (widget *Widget) Refresh() { - widget.loadProjects() - if widget.Disabled() || widget.CurrentProject() == nil { widget.SetItemCount(0) return } + widget.loadProjects() + widget.SetItemCount(len(widget.CurrentProject().tasks)) widget.display() }