@@ -60,7 +60,6 @@ class PodcastsTableViewController: UIViewController {
60
60
61
61
NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: #selector( removePlayerNavButtonAndReload) , name: Constants . kPlayerHasNoItem, object: nil )
62
62
NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: #selector( reloadPodcastData) , name: Constants . kDownloadHasFinished, object: nil )
63
- NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: #selector( unsubscribeFromPodcast ( _: ) ) , name: Constants . kUnsubscribeFromPodcast, object: nil )
64
63
NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: #selector( clearParsingActivity) , name: Constants . kInternetIsUnreachable, object: nil )
65
64
updateParsingActivity ( )
66
65
@@ -88,25 +87,6 @@ class PodcastsTableViewController: UIViewController {
88
87
refreshPodcastFeeds ( )
89
88
}
90
89
91
- func unsubscribeFromPodcast( notification: NSNotification ) {
92
- if let unsubscribedPodcastInfo = notification. userInfo {
93
- for (index, podcast) in self . subscribedPodcastsArray. enumerate ( ) {
94
- if podcast. feedURL == unsubscribedPodcastInfo [ " feedURL " ] as? String {
95
- //ATTENTION NOTE: Any additional view controllers pushed on this nav stack need to be checked and popped
96
- if let topVC = self . navigationController? . topViewController as? EpisodesTableViewController where topVC. selectedPodcast. feedURL == podcast. feedURL {
97
- self . navigationController? . popToRootViewControllerAnimated ( false )
98
- }
99
- else if let topVC = self . navigationController? . topViewController as? ClipsTableViewController where topVC. selectedPodcast. feedURL == podcast. feedURL {
100
- self . navigationController? . popToRootViewControllerAnimated ( false )
101
- }
102
-
103
- subscribedPodcastsArray. removeAtIndex ( index)
104
- self . tableView. reloadData ( )
105
- }
106
- }
107
- }
108
- }
109
-
110
90
private func refreshPodcastFeeds( ) {
111
91
let moc = self . coreDataHelper. managedObjectContext
112
92
let podcastsPredicate = NSPredicate ( format: " isSubscribed == %@ " , NSNumber ( bool: true ) )
@@ -389,7 +369,7 @@ extension PodcastsTableViewController: PVFeedParserDelegate {
389
369
} else if let url = feedURL, let index = self . followedPodcastsArray. indexOf ( { url == $0. feedURL } ) {
390
370
let podcast = CoreDataHelper . fetchEntityWithID ( self . followedPodcastsArray [ index] . objectID, moc: self . managedObjectContext) as! Podcast
391
371
self . followedPodcastsArray [ index] = podcast
392
- self . tableView. reloadRowsAtIndexPaths ( [ NSIndexPath ( forRow: index, inSection: 0 ) ] , withRowAnimation: . None)
372
+ self . tableView. reloadRowsAtIndexPaths ( [ NSIndexPath ( forRow: index, inSection: 1 ) ] , withRowAnimation: . None)
393
373
}
394
374
else {
395
375
self . reloadPodcastData ( )
0 commit comments