Deal with non-optional Node.childNodes.
This commit is contained in:
parent
49059fe78e
commit
fc38a485d6
|
@ -91,7 +91,7 @@ extension FeedListViewController: NSOutlineViewDataSource {
|
||||||
|
|
||||||
func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
|
func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
|
||||||
|
|
||||||
return nodeForItem(item as AnyObject?).childNodes![index]
|
return nodeForItem(item as AnyObject?).childNodes[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool {
|
func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool {
|
||||||
|
|
|
@ -147,9 +147,8 @@ private extension AddFeedWindowController {
|
||||||
menuItem.representedObject = folderTreeController.rootNode.representedObject
|
menuItem.representedObject = folderTreeController.rootNode.representedObject
|
||||||
menu.addItem(menuItem)
|
menu.addItem(menuItem)
|
||||||
|
|
||||||
if let childNodes = folderTreeController.rootNode.childNodes {
|
let childNodes = folderTreeController.rootNode.childNodes
|
||||||
addFolderItemsToMenuWithNodes(menu: menu, nodes: childNodes, indentationLevel: 1)
|
addFolderItemsToMenuWithNodes(menu: menu, nodes: childNodes, indentationLevel: 1)
|
||||||
}
|
|
||||||
|
|
||||||
return menu
|
return menu
|
||||||
}
|
}
|
||||||
|
@ -166,7 +165,7 @@ private extension AddFeedWindowController {
|
||||||
menu.addItem(menuItem)
|
menu.addItem(menuItem)
|
||||||
|
|
||||||
if oneNode.numberOfChildNodes > 0 {
|
if oneNode.numberOfChildNodes > 0 {
|
||||||
addFolderItemsToMenuWithNodes(menu: menu, nodes: oneNode.childNodes!, indentationLevel: indentationLevel + 1)
|
addFolderItemsToMenuWithNodes(menu: menu, nodes: oneNode.childNodes, indentationLevel: indentationLevel + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ import RSCore
|
||||||
|
|
||||||
func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
|
func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
|
||||||
|
|
||||||
return nodeForItem(item as AnyObject?).childNodes![index]
|
return nodeForItem(item as AnyObject?).childNodes[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool {
|
func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool {
|
||||||
|
|
Loading…
Reference in New Issue