Fix a second bug loading feeds. Feeds now appear in the sidebar.

This commit is contained in:
Brent Simmons 2017-10-05 21:17:50 -07:00
parent 199dd0e247
commit 12ea6e6a9f
1 changed files with 12 additions and 1 deletions

View File

@ -13,7 +13,18 @@ extension Account: Container {
public func flattenedFeeds() -> Set<Feed> {
return Set(feedIDDictionary.values)
var feeds = Set<Feed>()
for object in topLevelObjects {
if let feed = object as? Feed {
feeds.insert(feed)
}
else if let folder = object as? Folder {
feeds.formUnion(folder.flattenedFeeds())
}
}
return feeds
}
public func existingFeed(with feedID: String) -> Feed? {