[gnome-todo] task-list-view: reset completed counter when loading a list



commit 59978997e609ed94b84d1920bc2ad1a88e61756d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Oct 8 17:08:53 2016 -0300

    task-list-view: reset completed counter when loading a list
    
    Seems like we're summing up mindlessly all the completed tasks,
    without ever resetting the counter.
    
    Fix that by resetting the counter when a list is set.

 src/gtd-task-list-view.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gtd-task-list-view.c b/src/gtd-task-list-view.c
index 4dc7e6e..7525ed9 100644
--- a/src/gtd-task-list-view.c
+++ b/src/gtd-task-list-view.c
@@ -1028,6 +1028,7 @@ gtd_task_list_view_set_list (GtdTaskListView *view,
 
   priv = view->priv;
   old_list = priv->list;
+  priv->complete_tasks = 0;
 
   /* Remove the tasks that are in the current list, but not in the new list */
   for (l = old_list; l != NULL; l = l->next)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]