Fix for problem when new download can not be started after one is completed
authorteknolog
Thu, 04 Mar 2010 19:46:25 +0000
changeset 33 64ed1227e68d
parent 32 26a3f2dfba08
child 34 a6046405f1aa
Fix for problem when new download can not be started after one is completed
application/src/PodcastFeedView.cpp
application/src/PodcastListView.cpp
application/src/PodcastQueueView.cpp
application/src/PodcastShowsView.cpp
--- a/application/src/PodcastFeedView.cpp	Wed Mar 03 23:56:05 2010 +0000
+++ b/application/src/PodcastFeedView.cpp	Thu Mar 04 19:46:25 2010 +0000
@@ -189,6 +189,7 @@
 		} 
 	else 
 		{
+		UpdateListboxItemsL();		
 		UpdateToolbar();
 
 		if (iFirstActivateAfterLaunch)
--- a/application/src/PodcastListView.cpp	Wed Mar 03 23:56:05 2010 +0000
+++ b/application/src/PodcastListView.cpp	Thu Mar 04 19:46:25 2010 +0000
@@ -261,8 +261,6 @@
 		
 		AppUi()->AddToStackL(*this, iListContainer);
 		iListContainer->MakeVisible(ETrue);
-		UpdateListboxItemsL();		
-		iListContainer->DrawNow();
 	}
 	DP("CPodcastListView::DoActivateL() END");
 
--- a/application/src/PodcastQueueView.cpp	Wed Mar 03 23:56:05 2010 +0000
+++ b/application/src/PodcastQueueView.cpp	Thu Mar 04 19:46:25 2010 +0000
@@ -234,23 +234,27 @@
 
 void CPodcastQueueView::ShowDownloadFinishedL(TUint /*aShowUid*/, TInt aError)
 	{
-	iProgressAdded = EFalse;
-
-	iPodcastModel.GetShowsDownloadingL();
-	UpdateListboxItemsL();
-	UpdateToolbar();
-	
-	switch(aError)
+	if (iListContainer->IsVisible()) 
 		{
-		case KErrCouldNotConnect:
+	
+		iProgressAdded = EFalse;
+	
+		iPodcastModel.GetShowsDownloadingL();
+		UpdateListboxItemsL();
+		UpdateToolbar();
+		
+		switch(aError)
 			{
-			TBuf<KMaxMessageLength> message;
-			iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
-			ShowErrorMessage(message);
+			case KErrCouldNotConnect:
+				{
+				TBuf<KMaxMessageLength> message;
+				iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
+				ShowErrorMessage(message);
+				}
+				break;
+			default: // Do nothing
+				break;
 			}
-			break;
-		default: // Do nothing
-			break;
 		}
 	}
 
--- a/application/src/PodcastShowsView.cpp	Wed Mar 03 23:56:05 2010 +0000
+++ b/application/src/PodcastShowsView.cpp	Thu Mar 04 19:46:25 2010 +0000
@@ -570,6 +570,7 @@
 		case EPodcastDownloadShow:
 			{
 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
+			
 			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 				{
 				iPodcastModel.ShowEngine().AddDownloadL(*iPodcastModel.ActiveShowList()[index]);