From fc0181cc2a3638ea7563c0410e68954b5eafd141 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 11 Sep 2019 14:00:07 -0500 Subject: [PATCH] Make Node to IndexPath resolving methods private as they should no longer be used by the controllers --- iOS/SceneCoordinator.swift | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 4c9b8d82d..0b179eb10 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -435,13 +435,6 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { return expandedNodes.contains(node) } - func nodeFor(_ indexPath: IndexPath) -> Node? { - guard indexPath.section < shadowTable.count && indexPath.row < shadowTable[indexPath.section].count else { - return nil - } - return shadowTable[indexPath.section][indexPath.row] - } - func shadowNodesFor(section: Int) -> [Node] { return shadowTable[section] } @@ -453,22 +446,6 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { return indexPath } - func indexPathFor(_ node: Node) -> IndexPath? { - for i in 0.. IndexPath? { - guard let node = treeController.rootNode.descendantNodeRepresentingObject(object) else { - return nil - } - return indexPathFor(node) - } - func unreadCountFor(_ node: Node) -> Int { // The coordinator supplies the unread count for the currently selected feed node if let indexPath = currentFeedIndexPath, let selectedNode = nodeFor(indexPath), selectedNode == node { @@ -1072,6 +1049,29 @@ private extension SceneCoordinator { } } + func nodeFor(_ indexPath: IndexPath) -> Node? { + guard indexPath.section < shadowTable.count && indexPath.row < shadowTable[indexPath.section].count else { + return nil + } + return shadowTable[indexPath.section][indexPath.row] + } + + func indexPathFor(_ node: Node) -> IndexPath? { + for i in 0.. IndexPath? { + guard let node = treeController.rootNode.descendantNodeRepresentingObject(object) else { + return nil + } + return indexPathFor(node) + } + func updateShowAvatars() { if showFeedNames {