Disallow dragging of built-in smart feeds.

This commit is contained in:
Brent Simmons 2018-09-18 21:12:11 -07:00
parent 896ff7503d
commit 350aee6fb1
1 changed files with 7 additions and 1 deletions

View File

@ -37,8 +37,14 @@ import RSCore
}
func outlineView(_ outlineView: NSOutlineView, pasteboardWriterForItem item: Any) -> NSPasteboardWriting? {
let node = nodeForItem(item as AnyObject?)
guard !(node.representedObject is PseudoFeed) else {
// We dont allow the built-in smart feeds to be dragged.
// This will have to be revisited later when there are user-created smart feeds that *can* be dragged.
return nil
}
return (node.representedObject as? PasteboardWriterOwner)?.pasteboardWriter
}
}