--- a/engine/src/FeedInfo.cpp Wed Mar 31 16:06:20 2010 +0200
+++ b/engine/src/FeedInfo.cpp Wed Mar 31 18:09:02 2010 +0200
@@ -53,7 +53,7 @@
copy->SetBuildDate(BuildDate());
copy->SetLastUpdated(LastUpdated());
copy->iFeedIcon->Duplicate(iFeedIcon->Handle());
- copy->SetImageFileNameL(ImageFileName());
+ copy->SetImageFileNameL(ImageFileName(), NULL);
if(CustomTitle())
{
copy->SetCustomTitle();
@@ -193,7 +193,7 @@
return iImageFileName ? *iImageFileName : KNullDesC();
}
-EXPORT_C void CFeedInfo::SetImageFileNameL(const TDesC& aFileName)
+EXPORT_C void CFeedInfo::SetImageFileNameL(const TDesC& aFileName, CPodcastModel* aPodcastModel)
{
TFileName cacheFileName;
@@ -202,15 +202,22 @@
delete iImageFileName;
iImageFileName = NULL;
}
+
iImageFileName = aFileName.AllocL();
TParsePtrC parser(*iImageFileName);
cacheFileName = parser.DriveAndPath();
cacheFileName.Append(parser.Name());
cacheFileName.Append(KMbmExtension());
+
if( iFeedIcon->SizeInPixels() == TSize(0,0) && BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), cacheFileName) )
{
iFeedIcon = CEikonEnv::Static()->CreateBitmapL(cacheFileName, 0);
- }
+ }
+ else if(aPodcastModel && BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), ImageFileName() ))
+ {
+ // If this fails, no reason to worry
+ TRAP_IGNORE(aPodcastModel->ImageHandler().LoadFileAndScaleL(FeedIcon(), ImageFileName(), TSize(64,56), *this, Uid()));
+ }
}
EXPORT_C TBool CFeedInfo::CustomTitle() const