Give has(feed) a default implementation in Container.swift.
This commit is contained in:
parent
fe2d329301
commit
bffda93700
|
@ -649,10 +649,6 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
||||||
postChildrenDidChangeNotification()
|
postChildrenDidChangeNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
public func has(_ feed: Feed) -> Bool {
|
|
||||||
return flattenedFeeds().contains(feed)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Debug
|
// MARK: - Debug
|
||||||
|
|
||||||
public func debugDropConditionalGetInfo() {
|
public func debugDropConditionalGetInfo() {
|
||||||
|
|
|
@ -95,6 +95,10 @@ public extension Container {
|
||||||
return existingFeed(withURL: url) != nil
|
return existingFeed(withURL: url) != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func has(_ feed: Feed) -> Bool {
|
||||||
|
return flattenedFeeds().contains(feed)
|
||||||
|
}
|
||||||
|
|
||||||
func existingFeed(with feedID: String) -> Feed? {
|
func existingFeed(with feedID: String) -> Feed? {
|
||||||
for feed in flattenedFeeds() {
|
for feed in flattenedFeeds() {
|
||||||
if feed.feedID == feedID {
|
if feed.feedID == feedID {
|
||||||
|
|
|
@ -102,10 +102,6 @@ public final class Folder: DisplayNameProvider, Renamable, Container, UnreadCoun
|
||||||
postChildrenDidChangeNotification()
|
postChildrenDidChangeNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
public func has(_ feed: Feed) -> Bool {
|
|
||||||
return flattenedFeeds().contains(feed)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Hashable
|
// MARK: - Hashable
|
||||||
|
|
||||||
public func hash(into hasher: inout Hasher) {
|
public func hash(into hasher: inout Hasher) {
|
||||||
|
|
Loading…
Reference in New Issue