mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 10:02:37 +01:00
Allow for a drop-on index when dragging a single local feed.
This commit is contained in:
parent
04270aaad7
commit
6fba06425c
@ -176,6 +176,9 @@ private extension SidebarOutlineDataSource {
|
||||
if nodeHasChildRepresentingDraggedFeed(dropTargetNode, draggedFeed) {
|
||||
return SidebarOutlineDataSource.dragOperationNone
|
||||
}
|
||||
if parentNode == dropTargetNode && index == NSOutlineViewDropOnItemIndex {
|
||||
return .move
|
||||
}
|
||||
let updatedIndex = indexWhereDraggedFeedWouldAppear(dropTargetNode, draggedFeed)
|
||||
if parentNode !== dropTargetNode || index != updatedIndex {
|
||||
outlineView.setDropItem(dropTargetNode, dropChildIndex: updatedIndex)
|
||||
@ -250,6 +253,7 @@ private extension SidebarOutlineDataSource {
|
||||
BatchUpdate.shared.perform {
|
||||
draggedNodes.forEach { move(node: $0, to: parentNode, account: account) }
|
||||
}
|
||||
account.structureDidChange()
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user