diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index d42e093c9..1a6acf1c6 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -615,10 +615,6 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, } } - public func has(_ feed: Feed) -> Bool { - return flattenedFeeds().contains(feed) - } - // MARK: - Container public func flattenedFeeds() -> Set { @@ -653,6 +649,10 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, postChildrenDidChangeNotification() } + public func has(_ feed: Feed) -> Bool { + return flattenedFeeds().contains(feed) + } + // MARK: - Debug public func debugDropConditionalGetInfo() { diff --git a/Frameworks/Account/Container.swift b/Frameworks/Account/Container.swift index c37cf2bfe..8d337ebe6 100644 --- a/Frameworks/Account/Container.swift +++ b/Frameworks/Account/Container.swift @@ -33,6 +33,7 @@ public protocol Container: class { //Recursive — checks subfolders func flattenedFeeds() -> Set + func has(_ feed: Feed) -> Bool func hasFeed(with feedID: String) -> Bool func hasFeed(withURL url: String) -> Bool func existingFeed(with feedID: String) -> Feed? diff --git a/Frameworks/Account/Folder.swift b/Frameworks/Account/Folder.swift index 6d164a28c..f47f07c02 100644 --- a/Frameworks/Account/Folder.swift +++ b/Frameworks/Account/Folder.swift @@ -101,7 +101,11 @@ public final class Folder: DisplayNameProvider, Renamable, Container, UnreadCoun topLevelFeeds.remove(feed) postChildrenDidChangeNotification() } - + + public func has(_ feed: Feed) -> Bool { + return flattenedFeeds().contains(feed) + } + // MARK: - Hashable public func hash(into hasher: inout Hasher) {