From 12ea6e6a9f49a84ac171704492ed5598d89a0ae7 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 5 Oct 2017 21:17:50 -0700 Subject: [PATCH] Fix a second bug loading feeds. Feeds now appear in the sidebar. --- .../Account/Container/Account+Container.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/Container/Account+Container.swift b/Frameworks/Account/Container/Account+Container.swift index e45084ec8..4fef6bdb2 100644 --- a/Frameworks/Account/Container/Account+Container.swift +++ b/Frameworks/Account/Container/Account+Container.swift @@ -13,7 +13,18 @@ extension Account: Container { public func flattenedFeeds() -> Set { - return Set(feedIDDictionary.values) + var feeds = Set() + + 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? {