[tasque] [RTM] Fix tasks belong to wrong list bug



commit e49564623e7aa544ec21ecc456aaac5501719227
Author: Antonius Riha <antoniusriha gmail com>
Date:   Thu Aug 23 09:50:42 2012 +0200

    [RTM] Fix tasks belong to wrong list bug
    
    The bug caused the tasks to be added to the wrong list ("All Tasks") when
    loaded from RTM. This was because "All tasks" is a smart list (kind of filter)
    not an actual list.
    
    This also made it impossible to complete tasks in RTM, which is now
    possible again.

 src/Backends/Rtm/RtmBackend.cs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Backends/Rtm/RtmBackend.cs b/src/Backends/Rtm/RtmBackend.cs
index 98acec8..b59e236 100644
--- a/src/Backends/Rtm/RtmBackend.cs
+++ b/src/Backends/Rtm/RtmBackend.cs
@@ -597,6 +597,12 @@ namespace Tasque.Backends.RtmBackend
 			try {
 				foreach(List list in lists.listCollection)
 				{
+					// smart lists are based on criteria and therefore
+					// can contain tasks that actually belong to another list.
+					// Hence skip smart lists in task list population.
+					if (list.Smart == 1)
+						continue;
+					
 					Tasks tasks = null;
 					try {
 						tasks = rtm.TasksGetList(list.ID);
@@ -618,7 +624,7 @@ namespace Tasque.Backends.RtmBackend
 									Gtk.TreeIter iter;
 									
 									Gtk.Application.Invoke ( delegate {
-
+										Logger.Debug ("Refreshing task: " + rtmTask.Name);
 										if(taskIters.ContainsKey(rtmTask.ID)) {
 											iter = taskIters[rtmTask.ID];
 										} else {



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