Fix so "Updating..." text remains for a feed when list is updated RCL_3
authorSebastian Brannstrom <sebastianb@symbian.org>
Sat, 30 Oct 2010 11:29:14 +0100
branchRCL_3
changeset 306 a36dc474cae2
parent 305 dc1c3d779802
child 307 baf7ea4347f9
Fix so "Updating..." text remains for a feed when list is updated
application/inc/PodcastFeedView.h
application/src/PodcastFeedView.cpp
--- a/application/inc/PodcastFeedView.h	Sat Oct 30 11:28:49 2010 +0100
+++ b/application/inc/PodcastFeedView.h	Sat Oct 30 11:29:14 2010 +0100
@@ -115,7 +115,7 @@
 		
 	private:
 		CPodcastModel& iPodcastModel;		
-		TBool iUpdatingRunning;
+		TUint iFeedUpdating;
 		HBufC* iFeedsFormat;
 		HBufC* iNeverUpdated;
 		CPodcastFeedViewUpdater* iUpdater;
--- a/application/src/PodcastFeedView.cpp	Sat Oct 30 11:28:49 2010 +0100
+++ b/application/src/PodcastFeedView.cpp	Sat Oct 30 11:29:14 2010 +0100
@@ -132,7 +132,7 @@
 	iItemIdArray[aIndex] = sortedItems[aIndex]->Uid();
 	
 	// Prepare data to update the listbox item with
-	FormatFeedInfoListBoxItemL(*sortedItems[aIndex], EFalse);
+	FormatFeedInfoListBoxItemL(*sortedItems[aIndex], sortedItems[aIndex]->Uid() == iFeedUpdating);
 	
 	// If nothing has changed, we are done here
 	if (iListboxFormatbuffer == iItemArray->MdcaPoint(aIndex))
@@ -219,14 +219,15 @@
 
 void CPodcastFeedView::FeedUpdateAllCompleteL(TFeedState /*aState*/)
 	{
-	iUpdatingRunning = EFalse;
+	DP("FeedUpdateAllCompleteL");
+	iFeedUpdating = 0;
 	UpdateToolbar();
 	}
 
 void CPodcastFeedView::FeedDownloadStartedL(TFeedState /*aState*/, TUint aFeedUid)
 	{
 	// Update status text
-	iUpdatingRunning = ETrue;
+	iFeedUpdating = aFeedUid;
 	UpdateFeedInfoStatusL(aFeedUid, ETrue);
 	
 	UpdateToolbar();
@@ -504,7 +505,7 @@
 			}break;
 		case EPodcastCancelUpdateAllFeeds:
 			{
-			if(iUpdatingRunning)
+			if(iFeedUpdating)
 				{
 				iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
 				}
@@ -528,10 +529,10 @@
 		if (iListContainer->IsVisible()) {
 			toolbar->SetToolbarVisibility(aVisible);
 		}
-		toolbar->HideItem(EPodcastUpdateAllFeeds, iUpdatingRunning, ETrue);
-		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iUpdatingRunning, ETrue );
-		toolbar->SetItemDimmed(EPodcastAddFeed, iUpdatingRunning, ETrue );
-		toolbar->SetItemDimmed(EPodcastSettings, iUpdatingRunning, ETrue );
+		toolbar->HideItem(EPodcastUpdateAllFeeds, iFeedUpdating, ETrue);
+		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iFeedUpdating, ETrue );
+		toolbar->SetItemDimmed(EPodcastAddFeed, iFeedUpdating, ETrue );
+		toolbar->SetItemDimmed(EPodcastSettings, iFeedUpdating, ETrue );
 		}
 	DP("CPodcastFeedView::UpdateToolbar END");
 }