mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-28 10:30:14 +01:00
Make Feed and Folder conform to Renewable.
This commit is contained in:
parent
7d4319ff43
commit
b900cbc0b7
@ -12,7 +12,7 @@ import RSWeb
|
||||
import Articles
|
||||
import RSDatabase
|
||||
|
||||
public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
public final class Feed: DisplayNameProvider, Renamable, UnreadCountProvider, Hashable {
|
||||
|
||||
private struct Key {
|
||||
static let url = "url"
|
||||
@ -140,6 +140,12 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
return NSLocalizedString("Untitled", comment: "Feed name")
|
||||
}
|
||||
|
||||
// MARK: - Renamable
|
||||
|
||||
public func rename(to newName: String) {
|
||||
editedName = newName
|
||||
}
|
||||
|
||||
// MARK: - UnreadCountProvider
|
||||
|
||||
public var unreadCount: Int {
|
||||
|
@ -10,7 +10,7 @@ import Foundation
|
||||
import Articles
|
||||
import RSCore
|
||||
|
||||
public final class Folder: DisplayNameProvider, Container, UnreadCountProvider, Hashable {
|
||||
public final class Folder: DisplayNameProvider, Renamable, Container, UnreadCountProvider, Hashable {
|
||||
|
||||
|
||||
public weak var account: Account?
|
||||
@ -43,6 +43,12 @@ public final class Folder: DisplayNameProvider, Container, UnreadCountProvider,
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Renamable
|
||||
|
||||
public func rename(to newName: String) {
|
||||
name = newName
|
||||
}
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
init(account: Account, name: String?) {
|
||||
|
Loading…
Reference in New Issue
Block a user