diff --git a/Yep/ViewControllers/Feeds/FeedsViewController.swift b/Yep/ViewControllers/Feeds/FeedsViewController.swift index 62de0b82..8db9846f 100644 --- a/Yep/ViewControllers/Feeds/FeedsViewController.swift +++ b/Yep/ViewControllers/Feeds/FeedsViewController.swift @@ -198,26 +198,27 @@ class FeedsViewController: UIViewController { if let strongSelf = self { - let oldFeedSet = Set(strongSelf.feeds) - let newFeedSet = Set(feeds) +// let oldFeedSet = Set(strongSelf.feeds) +// let newFeedSet = Set(feeds) - let unionFeedSet = oldFeedSet.union(newFeedSet) - let allNewFeedSet = newFeedSet.subtract(oldFeedSet) +// let unionFeedSet = oldFeedSet.union(newFeedSet) +// let allNewFeedSet = newFeedSet.subtract(oldFeedSet) - let allFeeds = Array(unionFeedSet).sort({ $0.createdUnixTime > $1.createdUnixTime }) - - let newIndexPaths = allNewFeedSet.map({ allFeeds.indexOf($0) }).flatMap({ $0 }).map({ NSIndexPath(forRow: $0, inSection: Section.Feed.rawValue) }) +// let allFeeds = Array(unionFeedSet) +// +// let newIndexPaths = allNewFeedSet.map({ allFeeds.indexOf($0) }).flatMap({ $0 }).map({ NSIndexPath(forRow: $0, inSection: Section.Feed.rawValue) }) dispatch_async(dispatch_get_main_queue()) { - strongSelf.feeds = allFeeds - - if newIndexPaths.count == allNewFeedSet.count { - strongSelf.updateFeedsTableViewOrInsertWithIndexPaths(newIndexPaths) - - } else { - strongSelf.updateFeedsTableViewOrInsertWithIndexPaths(nil) - } + strongSelf.feeds = feeds + strongSelf.feedsTableView.reloadData() + +// if newIndexPaths.count == allNewFeedSet.count { +// strongSelf.updateFeedsTableViewOrInsertWithIndexPaths(newIndexPaths) +// +// } else { +// strongSelf.updateFeedsTableViewOrInsertWithIndexPaths(nil) +// } } } })