Remove restriction on only moving and copying between local accounts.

This commit is contained in:
Maurice Parker 2019-05-28 11:09:47 -05:00
parent b3c4c8de59
commit 78c19bda43
1 changed files with 0 additions and 30 deletions

View File

@ -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<PasteboardFeed>) -> 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<PasteboardFeed>) -> Bool {
guard let parentAccountID = nodeAccountID(parentNode) else {
return false