Remove restriction on only moving and copying between local accounts.
This commit is contained in:
parent
b3c4c8de59
commit
78c19bda43
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue