application/src/PodcastSearchView.cpp
branchRCL_3
changeset 312 2faae209e72b
parent 309 d9f6395a50ea
child 313 0f30a75610de
equal deleted inserted replaced
311:606f4f6babf6 312:2faae209e72b
   225 				message.Format(templ, &newInfo->Title());
   225 				message.Format(templ, &newInfo->Title());
   226 				if(ShowQueryMessageL(message)) {
   226 				if(ShowQueryMessageL(message)) {
   227 					TBool added = iPodcastModel.FeedEngine().AddFeedL(*newInfo);
   227 					TBool added = iPodcastModel.FeedEngine().AddFeedL(*newInfo);
   228 					
   228 					
   229 					if (added)
   229 					if (added)
   230 						{					
   230 						{
   231 						// ask if user wants to update it now
   231 						// this is a bit of a hack, first we activate the feeds view normally
   232 						TBuf<KMaxMessageLength> message;
   232 						AppUi()->ActivateLocalViewL(KUidPodcastFeedViewID,  TUid::Uid(0), KNullDesC8);
   233 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS);
   233 						// and then we send the UID of the recently added feed back to feed view for updating
   234 						if(ShowQueryMessageL(message))
   234 						// this is needed so the update? query comes on top of feed view, not search view
   235 							{
   235 						AppUi()->ActivateLocalViewL(KUidPodcastFeedViewID,  TUid::Uid(newInfo->Uid()), KNullDesC8);
   236 							iPodcastModel.FeedEngine().UpdateFeedL(newInfo->Uid());
       
   237 							}
       
   238 						}
   236 						}
   239 					else
   237 					else
   240 						{
   238 						{
   241 						TBuf<KMaxMessageLength> message;
   239 						TBuf<KMaxMessageLength> message;
   242 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_EXISTS);
   240 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_EXISTS);