Exempt folders from the read filter if they have a child selected. Issue #1735

This commit is contained in:
Maurice Parker 2020-01-29 11:18:17 -07:00
parent b292ea97fc
commit 03fbdbbe66
1 changed files with 11 additions and 0 deletions

View File

@ -1278,11 +1278,22 @@ private extension SceneCoordinator {
} else if let webFeed = timelineFeed as? WebFeed {
if webFeed.account?.existingWebFeed(withWebFeedID: webFeed.webFeedID) != nil {
treeControllerDelegate.addFilterException(feedID)
addParentFolderToFilterExceptions(webFeed)
}
}
}
}
func addParentFolderToFilterExceptions(_ feed: Feed) {
guard let node = treeController.rootNode.descendantNodeRepresentingObject(feed as AnyObject),
let folder = node.parent?.representedObject as? Folder,
let folderFeedID = folder.feedID else {
return
}
treeControllerDelegate.addFilterException(folderFeedID)
}
func rebuildShadowTable() {
shadowTable = [[Node]]()