Fix for bug when editing feed URL
authorteknolog
Thu, 25 Feb 2010 18:56:36 +0000
changeset 12 47c8595ffc70
parent 11 f6c975c3b702
child 13 f58e3c482bd9
Fix for bug when editing feed URL
application/src/PodcastFeedView.cpp
--- a/application/src/PodcastFeedView.cpp	Thu Feb 25 18:26:52 2010 +0000
+++ b/application/src/PodcastFeedView.cpp	Thu Feb 25 18:56:36 2010 +0000
@@ -659,18 +659,15 @@
 						// Remove the temp entry so that the correct entry could be changed
 						iPodcastModel.FeedEngine().RemoveFeedL(temp->Uid());	
 						
-						// user has accepted that shows will be deleted
-						iPodcastModel.ShowEngine().DeleteAllShowsByFeedL(info->Uid());
-
-						// update URL
-						info->SetUrlL(url);	
-					
-						if (info->Title().Compare(title) != 0)
-							{
-							info->SetTitleL(title);
-							info->SetCustomTitle();	
-							}
-						iPodcastModel.FeedEngine().UpdateFeed(info);
+						// we remove the existing feed
+						iPodcastModel.FeedEngine().RemoveFeedL(info->Uid());	
+						
+						CFeedInfo* newFeed = CFeedInfo::NewLC();
+						newFeed->SetUrlL(url);
+						newFeed->SetTitleL(title);
+						
+						iPodcastModel.FeedEngine().AddFeedL(*newFeed);
+						CleanupStack::PopAndDestroy(newFeed);
 						UpdateListboxItemsL();
 					} else {
 						// the feed existed. Object deleted in AddFeed.