From bffda93700ca25f20240a46f3215548e6dd5fd8e Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 21 Aug 2019 21:07:40 -0700 Subject: [PATCH] Give has(feed) a default implementation in Container.swift. --- Frameworks/Account/Account.swift | 4 ---- Frameworks/Account/Container.swift | 4 ++++ Frameworks/Account/Folder.swift | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index 1a6acf1c6..6a94bf4e4 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -649,10 +649,6 @@ 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 8d337ebe6..610ee69b8 100644 --- a/Frameworks/Account/Container.swift +++ b/Frameworks/Account/Container.swift @@ -95,6 +95,10 @@ public extension Container { return existingFeed(withURL: url) != nil } + func has(_ feed: Feed) -> Bool { + return flattenedFeeds().contains(feed) + } + func existingFeed(with feedID: String) -> Feed? { for feed in flattenedFeeds() { if feed.feedID == feedID { diff --git a/Frameworks/Account/Folder.swift b/Frameworks/Account/Folder.swift index f47f07c02..bdfe13118 100644 --- a/Frameworks/Account/Folder.swift +++ b/Frameworks/Account/Folder.swift @@ -102,10 +102,6 @@ public final class Folder: DisplayNameProvider, Renamable, Container, UnreadCoun postChildrenDidChangeNotification() } - public func has(_ feed: Feed) -> Bool { - return flattenedFeeds().contains(feed) - } - // MARK: - Hashable public func hash(into hasher: inout Hasher) {