better feedsTableView update when afterCreatedFeedAction

This commit is contained in:
nixzhu
2016-01-06 14:52:28 +08:00
parent 4f968464e7
commit 3c659e5335
@@ -665,6 +665,8 @@ class FeedsViewController: BaseViewController {
if let strongSelf = self {
strongSelf.feedsTableView.beginUpdates()
var animation: UITableViewRowAnimation = .Automatic
if !strongSelf.uploadingFeeds.isEmpty {
@@ -678,6 +680,8 @@ class FeedsViewController: BaseViewController {
strongSelf.feeds.insert(feed, atIndex: 0)
let indexPath = NSIndexPath(forRow: 0, inSection: Section.Feed.rawValue)
strongSelf.updateFeedsTableViewOrInsertWithIndexPaths([indexPath], animation: animation)
strongSelf.feedsTableView.endUpdates()
}
}