application/src/PodcastFeedView.cpp
branchRCL_3
changeset 341 a648d7ca5e27
parent 328 75a70f4a4f6d
child 368 b131f7696342
equal deleted inserted replaced
339:3e12d343ea30 341:a648d7ca5e27
    40 const TInt KADayInHours = 24;
    40 const TInt KADayInHours = 24;
    41 #define KMaxMessageLength 200
    41 #define KMaxMessageLength 200
    42 #define KMaxTitleLength 100
    42 #define KMaxTitleLength 100
    43 
    43 
    44 _LIT(KFeedFormatPortrait, "%d\t%S\t%S%S");
    44 _LIT(KFeedFormatPortrait, "%d\t%S\t%S%S");
    45 //_LIT(KFeedFormatPortrait, "%d\t%S");
       
    46 _LIT(KFeedFormatLandscape, "%d\t%S");
    45 _LIT(KFeedFormatLandscape, "%d\t%S");
    47 enum 
    46 enum 
    48 {
    47 {
    49  EFeedIcon
    48  EFeedIcon
    50 };
    49 };
   234 			{
   233 			{
   235 			const RFeedInfoArray* sortedItems = NULL;
   234 			const RFeedInfoArray* sortedItems = NULL;
   236 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
   235 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
   237 			sortedItems = &iPodcastModel.FeedEngine().GetSortedFeeds();
   236 			sortedItems = &iPodcastModel.FeedEngine().GetSortedFeeds();
   238 
   237 
   239 			DP1("Desc: %S",&((*sortedItems)[index]->Description().Left(30)));
       
   240 			if(index >= 0 && index < sortedItems->Count())
   238 			if(index >= 0 && index < sortedItems->Count())
   241 				{
   239 				{
   242 				iPodcastModel.SetActiveFeedInfo((*sortedItems)[index]);			
   240 				iPodcastModel.SetActiveFeedInfo((*sortedItems)[index]);			
   243 				iViewingShows = ETrue;
   241 				iViewingShows = ETrue;
   244 				AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
   242 				AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
   393 			updatedDate.Zero();
   391 			updatedDate.Zero();
   394 			}
   392 			}
   395 		}
   393 		}
   396 	
   394 	
   397 	iconIndex = iFeedIdForIconArray.Find(aFeedInfo.Uid());
   395 	iconIndex = iFeedIdForIconArray.Find(aFeedInfo.Uid());
       
   396 	DP1("    iconIndex = %d", iconIndex);
   398 	if(iconIndex == KErrNotFound && aFeedInfo.FeedIcon() != NULL && aFeedInfo.ImageFileName().Length() > 0 && 
   397 	if(iconIndex == KErrNotFound && aFeedInfo.FeedIcon() != NULL && aFeedInfo.ImageFileName().Length() > 0 && 
   399 			aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 &&
   398 			aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 &&
   400 			aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0)
   399 			aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0)
   401 		{
   400 		{
   402 		// Hopefully temporary haxx to prevent double delete. I would prefer if
   401 		// Hopefully temporary haxx to prevent double delete. I would prefer if
   494 		while (iItemArray->Count() > nbrItems)
   493 		while (iItemArray->Count() > nbrItems)
   495 			{
   494 			{
   496 			iItemArray->Delete(iItemArray->Count() - 1);
   495 			iItemArray->Delete(iItemArray->Count() - 1);
   497 			iItemArrayShort->Delete(iItemArray->Count() - 1);		
   496 			iItemArrayShort->Delete(iItemArray->Count() - 1);		
   498 			}
   497 			}
   499 		//iListContainer->Listbox()->
       
   500 		iUpdater->StartUpdate(nbrItems);
   498 		iUpdater->StartUpdate(nbrItems);
   501 		}
   499 		}
   502 	else
   500 	else
   503 		{
   501 		{
   504 		// No feeds at all in the list , add dummy list item
   502 		// No feeds at all in the list , add dummy list item