657 if (added) { |
657 if (added) { |
658 // The Feed URL did not exist |
658 // The Feed URL did not exist |
659 // Remove the temp entry so that the correct entry could be changed |
659 // Remove the temp entry so that the correct entry could be changed |
660 iPodcastModel.FeedEngine().RemoveFeedL(temp->Uid()); |
660 iPodcastModel.FeedEngine().RemoveFeedL(temp->Uid()); |
661 |
661 |
662 // user has accepted that shows will be deleted |
662 // we remove the existing feed |
663 iPodcastModel.ShowEngine().DeleteAllShowsByFeedL(info->Uid()); |
663 iPodcastModel.FeedEngine().RemoveFeedL(info->Uid()); |
664 |
664 |
665 // update URL |
665 CFeedInfo* newFeed = CFeedInfo::NewLC(); |
666 info->SetUrlL(url); |
666 newFeed->SetUrlL(url); |
667 |
667 newFeed->SetTitleL(title); |
668 if (info->Title().Compare(title) != 0) |
668 |
669 { |
669 iPodcastModel.FeedEngine().AddFeedL(*newFeed); |
670 info->SetTitleL(title); |
670 CleanupStack::PopAndDestroy(newFeed); |
671 info->SetCustomTitle(); |
|
672 } |
|
673 iPodcastModel.FeedEngine().UpdateFeed(info); |
|
674 UpdateListboxItemsL(); |
671 UpdateListboxItemsL(); |
675 } else { |
672 } else { |
676 // the feed existed. Object deleted in AddFeed. |
673 // the feed existed. Object deleted in AddFeed. |
677 TBuf<KMaxMessageLength> dlgMessage; |
674 TBuf<KMaxMessageLength> dlgMessage; |
678 iEikonEnv->ReadResourceL(dlgMessage, R_ADD_FEED_EXISTS); |
675 iEikonEnv->ReadResourceL(dlgMessage, R_ADD_FEED_EXISTS); |