From 397d75c6f65ca8b71282141cf27438c6ef07e7a5 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 1 Sep 2019 10:11:03 -0500 Subject: [PATCH] Restore animation when adds and deletes happen to feed items --- iOS/MasterFeed/MasterFeedViewController.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index b9033446e..9176fc4b4 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -392,12 +392,13 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner { func reloadFeeds() { updateUI() - applyChanges(animate: true) - + // We have to reload all the visible cells because if we got here by doing a table cell move, // then the table itself is in a weird state. This is because we do unusual things like allowing // drops on a "folder" that should cause the dropped cell to disappear. - reloadAllVisibleCells() + applyChanges(animate: true) { [weak self] in + self?.reloadAllVisibleCells() + } } func discloseFeed(_ feed: Feed, completion: (() -> Void)? = nil) {