mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Todoist now properly updates list items when Refresh() is called
This commit is contained in:
parent
9a877b5e04
commit
09ea4cd874
@ -53,14 +53,16 @@ func (widget *Widget) ProjectAt(idx int) *Project {
|
|||||||
return widget.projects[idx]
|
return widget.projects[idx]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Widget) Refresh() {
|
func (widget *Widget) Refresh() {
|
||||||
if w.Disabled() || w.CurrentProject() == nil {
|
widget.loadProjects()
|
||||||
w.SetItemCount(0)
|
|
||||||
|
if widget.Disabled() || widget.CurrentProject() == nil {
|
||||||
|
widget.SetItemCount(0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.SetItemCount(len(w.CurrentProject().tasks))
|
widget.SetItemCount(len(widget.CurrentProject().tasks))
|
||||||
w.display()
|
widget.display()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) HelpText() string {
|
func (widget *Widget) HelpText() string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user