Fix for incorrect error handling of show downloads
authorteknolog
Thu, 25 Feb 2010 16:47:16 +0000
changeset 6 e211a78d3037
parent 5 ba42cd6670b8
child 7 a7a43293ae56
Fix for incorrect error handling of show downloads
application/src/PodcastShowsView.cpp
engine/src/ShowEngine.cpp
--- a/application/src/PodcastShowsView.cpp	Thu Feb 25 16:27:23 2010 +0000
+++ b/application/src/PodcastShowsView.cpp	Thu Feb 25 16:47:16 2010 +0000
@@ -297,9 +297,10 @@
 			ShowErrorMessage(message);
 			}
 			break;
-		default: // Do nothing
+		default:
 			break;
 		}
+	UpdateListboxItemsL();
 	}
 
 
@@ -465,18 +466,15 @@
 
 	if(aShowInfo.LastError() != KErrNone)
 		{
-		TBuf<KSizeBufLen> errorBuffer;
-		GetShowErrorText(errorBuffer, aShowInfo.LastError());
-		iListboxFormatbuffer.Format(KShowErrorFormat(), iconIndex, &aShowInfo.Title(), &errorBuffer);
+		GetShowErrorText(infoSize, aShowInfo.LastError());
 		}
-	else	
+	
+	if (infoSize.Length() > 0)
 		{
-		if (infoSize.Length() > 0) {
-			infoSize.Insert(0,_L(", "));
+		infoSize.Insert(0,_L(", "));
 		}
 		
-		iListboxFormatbuffer.Format(KShowFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize);
-		}
+	iListboxFormatbuffer.Format(KShowFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize);
 	}
 
 void CPodcastShowsView::GetShowErrorText(TDes &aErrorMessage, TInt aErrorCode)
@@ -548,7 +546,8 @@
 				{
 				for (TInt loop = 0; loop< len; loop++)
 					{					
-					UpdateShowItemDataL(fItems[loop], loop);	
+					UpdateShowItemDataL(fItems[loop], loop);
+					iListContainer->Listbox()->DrawItem(loop);
 					}
 				}
 			else
--- a/engine/src/ShowEngine.cpp	Thu Feb 25 16:27:23 2010 +0000
+++ b/engine/src/ShowEngine.cpp	Thu Feb 25 16:47:16 2010 +0000
@@ -274,10 +274,14 @@
 		// decide what kind of file this is		
 		if(aError != KErrCouldNotConnect)
 			{
-			if(aError == KErrDisconnected && !iPodcastModel.SettingsEngine().DownloadSuspended()) {
+			if(aError == KErrDisconnected && iPodcastModel.SettingsEngine().DownloadSuspended())
+				{
 				// no error if disconnect happened because of suspended downloading
+				}
+			else
+				{
 				iShowDownloading->SetLastError(aError);
-			}
+				}
 
 			if (aError == KErrNone)
 				{