mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 18:32:55 +00:00
Rename Feed to SidebarItem. Fix #4752.
This commit is contained in:
1 parent
5ce9ba3a87
commit
49d2d6dfe6
16 files changed
+103
-103
No files matched your search
@@ -210,8 +210,8 @@ public final class AccountManager: UnreadCountProvider {
|
||||
return nil
|
||||
}
|
||||
|
||||
public func existingFeed(with feedID: SidebarItemIdentifier) -> Feed? {
|
||||
switch feedID {
|
||||
public func existingFeed(with sidebarItemID: SidebarItemIdentifier) -> SidebarItem? {
|
||||
switch sidebarItemID {
|
||||
case .folder(let accountID, let folderName):
|
||||
if let account = existingAccount(with: accountID) {
|
||||
return account.existingFolder(with: folderName)
|
||||
|
||||
@@ -10,7 +10,7 @@ import Foundation
|
||||
import Articles
|
||||
import RSCore
|
||||
|
||||
public final class Folder: Feed, Renamable, Container, Hashable {
|
||||
public final class Folder: SidebarItem, Renamable, Container, Hashable {
|
||||
|
||||
public var defaultReadFilterType: ReadFilterType {
|
||||
return .read
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Feed.swift
|
||||
// SidebarItem.swift
|
||||
// Account
|
||||
//
|
||||
// Created by Maurice Parker on 11/15/19.
|
||||
@@ -15,14 +15,14 @@ public enum ReadFilterType {
|
||||
case alwaysRead
|
||||
}
|
||||
|
||||
public protocol Feed: SidebarItemIdentifiable, ArticleFetcher, DisplayNameProvider, UnreadCountProvider {
|
||||
public protocol SidebarItem: SidebarItemIdentifiable, ArticleFetcher, DisplayNameProvider, UnreadCountProvider {
|
||||
|
||||
var account: Account? { get }
|
||||
var defaultReadFilterType: ReadFilterType { get }
|
||||
|
||||
}
|
||||
|
||||
public extension Feed {
|
||||
public extension SidebarItem {
|
||||
|
||||
func readFiltered(readFilterEnabledTable: [SidebarItemIdentifier: Bool]) -> Bool {
|
||||
guard defaultReadFilterType != .alwaysRead else {
|
||||
@@ -11,7 +11,7 @@ import RSCore
|
||||
import RSWeb
|
||||
import Articles
|
||||
|
||||
public final class WebFeed: Feed, Renamable, Hashable {
|
||||
public final class WebFeed: SidebarItem, Renamable, Hashable {
|
||||
|
||||
public var defaultReadFilterType: ReadFilterType {
|
||||
return .none
|
||||
|
||||
Reference in new issue
Block a user