From d7c3f1ee1958f6c9e52ca3d89d004511c030c469 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 23 Nov 2019 16:38:07 -0600 Subject: [PATCH] Don't attempt to move a feed if the drop target is the same as the source target. --- iOS/MasterFeed/MasterFeedViewController+Drop.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iOS/MasterFeed/MasterFeedViewController+Drop.swift b/iOS/MasterFeed/MasterFeedViewController+Drop.swift index 92eca2791..bd759e710 100644 --- a/iOS/MasterFeed/MasterFeedViewController+Drop.swift +++ b/iOS/MasterFeed/MasterFeedViewController+Drop.swift @@ -130,6 +130,8 @@ extension MasterFeedViewController: UITableViewDropDelegate { } func moveWebFeedInAccount(feed: WebFeed, sourceContainer: Container, destinationContainer: Container) { + guard sourceContainer !== destinationContainer else { return } + BatchUpdate.shared.start() sourceContainer.account?.moveWebFeed(feed, from: sourceContainer, to: destinationContainer) { result in BatchUpdate.shared.end()