engine/src/FeedEngine.cpp
changeset 106 83752b9e3cb6
parent 102 04c6ccce8e7e
child 107 af6475fdf8d6
--- a/engine/src/FeedEngine.cpp	Sat Apr 03 14:54:19 2010 +0100
+++ b/engine/src/FeedEngine.cpp	Sat Apr 03 16:03:09 2010 +0100
@@ -216,12 +216,13 @@
 		}
 	
 	iActiveFeed = GetFeedInfoByUid(aFeedUid);
-	iCatchupCounter = 0;
+	
 	iCancelRequested = EFalse;
 
 	if (iActiveFeed->LastUpdated() == 0)
 		{
 		iCatchupMode = ETrue;
+		iCatchupCounter = 0;
 		}
 	
 	iActiveFeed->SetLastError(KErrNone);
@@ -534,9 +535,6 @@
 		{		
 		case EUpdatingFeed: 
 		{
-		// Parse the feed. We need to trap this call since it could leave and then
-		// the whole update chain will be broken
-		// change client state
 		iClientState = EIdle;
 		switch (aError)
 			{
@@ -557,7 +555,10 @@
 					iActiveFeed->SetLastUpdated(time);
 	
 					if( aError == KErrNone)
-						{			
+						{
+						// Parse the feed. We need to trap this call since it could leave and then
+						// the whole update chain will be broken
+						// change client state
 						TRAPD(parserErr, iParser->ParseFeedL(iUpdatingFeedFileName, iActiveFeed, iPodcastModel.SettingsEngine().MaxListItems()));
 	
 						if(parserErr)
@@ -619,7 +620,7 @@
 					TRAP_IGNORE(iPodcastModel.ImageHandler().LoadFileAndScaleL(iActiveFeed->FeedIcon(), iActiveFeed->ImageFileName(), TSize(64,56), *iActiveFeed, iActiveFeed->Uid()));
 					}				
 				}
-			
+			DBUpdateFeedL(*iActiveFeed);
 			NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError);
 			UpdateNextFeedL();
 			}break;