From 78c19bda43afedd8994495017e4d0891e59d2a78 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 28 May 2019 11:09:47 -0500 Subject: [PATCH] Remove restriction on only moving and copying between local accounts. --- .../Sidebar/SidebarOutlineDataSource.swift | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift index 864f7bdfe..b9a0b0b6f 100644 --- a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift +++ b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift @@ -173,9 +173,6 @@ private extension SidebarOutlineDataSource { guard let dropTargetNode = ancestorThatCanAcceptLocalFeed(parentNode) else { return SidebarOutlineDataSource.dragOperationNone } - if !allParticipantsAreLocalAccounts(dropTargetNode, Set([draggedFeed])) { - return SidebarOutlineDataSource.dragOperationNone - } if nodeHasChildRepresentingDraggedFeed(dropTargetNode, draggedFeed) { return SidebarOutlineDataSource.dragOperationNone } @@ -195,9 +192,6 @@ private extension SidebarOutlineDataSource { guard let dropTargetNode = ancestorThatCanAcceptLocalFeed(parentNode) else { return SidebarOutlineDataSource.dragOperationNone } - if !allParticipantsAreLocalAccounts(dropTargetNode, draggedFeeds) { - return SidebarOutlineDataSource.dragOperationNone - } if nodeHasChildRepresentingAnyDraggedFeed(dropTargetNode, draggedFeeds) { return SidebarOutlineDataSource.dragOperationNone } @@ -411,30 +405,6 @@ private extension SidebarOutlineDataSource { return false } - func allParticipantsAreLocalAccounts(_ parentNode: Node, _ draggedFeeds: Set) -> Bool { - - if let account = parentNode.representedObject as? Account { - if account.type != .onMyMac { - return false - } - } else if let folder = parentNode.representedObject as? Folder { - if folder.account?.type != .onMyMac { - return false - } - } else { - return false - } - - for draggedFeed in draggedFeeds { - if draggedFeed.accountType != .onMyMac { - return false - } - } - - return true - - } - func allParticipantsAreSameAccount(_ parentNode: Node, _ draggedFeeds: Set) -> Bool { guard let parentAccountID = nodeAccountID(parentNode) else { return false