mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Todoist only refreshes if it is not disabled and there is a current project
This commit is contained in:
parent
09ea4cd874
commit
b9fc08e098
@ -54,13 +54,13 @@ func (widget *Widget) ProjectAt(idx int) *Project {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) Refresh() {
|
func (widget *Widget) Refresh() {
|
||||||
widget.loadProjects()
|
|
||||||
|
|
||||||
if widget.Disabled() || widget.CurrentProject() == nil {
|
if widget.Disabled() || widget.CurrentProject() == nil {
|
||||||
widget.SetItemCount(0)
|
widget.SetItemCount(0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
widget.loadProjects()
|
||||||
|
|
||||||
widget.SetItemCount(len(widget.CurrentProject().tasks))
|
widget.SetItemCount(len(widget.CurrentProject().tasks))
|
||||||
widget.display()
|
widget.display()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user