tasque r177 - in trunk: . src/Backends/Rtm



Author: sharm
Date: Tue Dec 23 14:48:45 2008
New Revision: 177
URL: http://svn.gnome.org/viewvc/tasque?rev=177&view=rev

Log:
* tasque/src/Backends/Rtm/RtmBackend.cs: Only make one call to
  ListsGetList during RefreshThreadLoop.

Modified:
   trunk/ChangeLog
   trunk/src/Backends/Rtm/RtmBackend.cs

Modified: trunk/src/Backends/Rtm/RtmBackend.cs
==============================================================================
--- trunk/src/Backends/Rtm/RtmBackend.cs	(original)
+++ trunk/src/Backends/Rtm/RtmBackend.cs	Tue Dec 23 14:48:45 2008
@@ -541,12 +541,11 @@
 		/// Update the model to match what is in RTM
 		/// FIXME: This is a lame implementation and needs to be optimized
 		/// </summary>		
-		private void UpdateCategories()
+		private void UpdateCategories(Lists lists)
 		{
 			Logger.Debug("RtmBackend.UpdateCategories was called");
 			
 			try {
-				Lists lists = rtm.ListsGetList();
 				foreach(List list in lists.listCollection)
 				{
 					RtmCategory rtmCategory = new RtmCategory(list);
@@ -579,12 +578,11 @@
 		/// Update the model to match what is in RTM
 		/// FIXME: This is a lame implementation and needs to be optimized
 		/// </summary>		
-		private void UpdateTasks()
+		private void UpdateTasks(Lists lists)
 		{
 			Logger.Debug("RtmBackend.UpdateTasks was called");
 			
 			try {
-				Lists lists = rtm.ListsGetList();
 				foreach(List list in lists.listCollection)
 				{
 					Tasks tasks = null;
@@ -649,8 +647,9 @@
 				runRefreshEvent.Reset();
 
 				if(rtmAuth != null) {
-					UpdateCategories();			
-					UpdateTasks();
+					Lists lists = rtm.ListsGetList();
+					UpdateCategories(lists);
+					UpdateTasks(lists);
 				}
 				if(!initialized) {
 					initialized = true;



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