# HG changeset patch # User Sebastian Brannstrom # Date 1288434554 -3600 # Node ID a36dc474cae210cff764d56f20556374ba3f7baa # Parent dc1c3d7798022b3680f9a1b4e637296e01aefdab Fix so "Updating..." text remains for a feed when list is updated diff -r dc1c3d779802 -r a36dc474cae2 application/inc/PodcastFeedView.h --- 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; diff -r dc1c3d779802 -r a36dc474cae2 application/src/PodcastFeedView.cpp --- 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"); }