2017-11-04 20:19:34 +01:00
|
|
|
//
|
|
|
|
// FeedListFolder.swift
|
|
|
|
// Evergreen
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 11/4/17.
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2017-11-04 22:53:21 +01:00
|
|
|
import RSCore
|
2018-07-24 03:29:08 +02:00
|
|
|
import Articles
|
2017-11-04 20:19:34 +01:00
|
|
|
|
2017-11-05 07:05:20 +01:00
|
|
|
final class FeedListFolder: Hashable, DisplayNameProvider {
|
2017-11-04 20:19:34 +01:00
|
|
|
|
|
|
|
let name: String
|
|
|
|
let feeds: Set<FeedListFeed>
|
|
|
|
|
2017-11-04 22:53:21 +01:00
|
|
|
var nameForDisplay: String { // DisplayNameProvider
|
2018-02-14 22:14:25 +01:00
|
|
|
return name
|
2017-11-04 22:53:21 +01:00
|
|
|
}
|
|
|
|
|
2017-11-04 20:19:34 +01:00
|
|
|
init(name: String, feeds: Set<FeedListFeed>) {
|
|
|
|
self.name = name
|
|
|
|
self.feeds = feeds
|
|
|
|
}
|
2018-08-26 01:52:57 +02:00
|
|
|
|
|
|
|
// MARK: - Hashable
|
|
|
|
|
|
|
|
public func hash(into hasher: inout Hasher) {
|
|
|
|
hasher.combine(name)
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: - Equatable
|
|
|
|
|
|
|
|
static func ==(lhs: FeedListFolder, rhs: FeedListFolder) -> Bool {
|
|
|
|
return lhs.name == rhs.name && lhs.feeds == rhs.feeds
|
|
|
|
}
|
2017-11-04 20:19:34 +01:00
|
|
|
}
|