Don't attempt to move a feed if the drop target is the same as the source target.

This commit is contained in:
Maurice Parker 2019-11-23 16:38:07 -06:00
parent 6d18cfec7c
commit d7c3f1ee19
1 changed files with 2 additions and 0 deletions

View File

@ -130,6 +130,8 @@ extension MasterFeedViewController: UITableViewDropDelegate {
} }
func moveWebFeedInAccount(feed: WebFeed, sourceContainer: Container, destinationContainer: Container) { func moveWebFeedInAccount(feed: WebFeed, sourceContainer: Container, destinationContainer: Container) {
guard sourceContainer !== destinationContainer else { return }
BatchUpdate.shared.start() BatchUpdate.shared.start()
sourceContainer.account?.moveWebFeed(feed, from: sourceContainer, to: destinationContainer) { result in sourceContainer.account?.moveWebFeed(feed, from: sourceContainer, to: destinationContainer) { result in
BatchUpdate.shared.end() BatchUpdate.shared.end()