From eed6333368508a09cc184800d8e2f0d75bd679aa Mon Sep 17 00:00:00 2001 From: Maurice Parker <mo@vincode.io> Date: Thu, 21 Nov 2019 13:49:05 -0600 Subject: [PATCH] Restrict drag and drop to the same process (for now) --- iOS/MasterFeed/MasterFeedViewController+Drag.swift | 2 +- iOS/MasterFeed/MasterFeedViewController+Drop.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/MasterFeed/MasterFeedViewController+Drag.swift b/iOS/MasterFeed/MasterFeedViewController+Drag.swift index 333b89814..65bd16610 100644 --- a/iOS/MasterFeed/MasterFeedViewController+Drag.swift +++ b/iOS/MasterFeed/MasterFeedViewController+Drag.swift @@ -20,7 +20,7 @@ extension MasterFeedViewController: UITableViewDragDelegate { let data = webFeed.url.data(using: .utf8) let itemProvider = NSItemProvider() - itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeURL as String, visibility: .all) { completion in + itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeURL as String, visibility: .ownProcess) { completion in completion(data, nil) return nil } diff --git a/iOS/MasterFeed/MasterFeedViewController+Drop.swift b/iOS/MasterFeed/MasterFeedViewController+Drop.swift index d77014ea7..afaf62a16 100644 --- a/iOS/MasterFeed/MasterFeedViewController+Drop.swift +++ b/iOS/MasterFeed/MasterFeedViewController+Drop.swift @@ -14,7 +14,7 @@ import RSTree extension MasterFeedViewController: UITableViewDropDelegate { func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool { - return session.localDragSession != nil //&& session.canLoadObjects(ofClass: URL.self) + return session.localDragSession != nil } func tableView(_ tableView: UITableView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UITableViewDropProposal {