mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Enhance SyncStatus so that it can communicate new, updated, and deleted
This commit is contained in:
@@ -12,12 +12,29 @@ import RSDatabase
|
||||
|
||||
public struct SyncStatus: Hashable, Equatable {
|
||||
|
||||
public enum Key: String {
|
||||
case read = "read"
|
||||
case starred = "starred"
|
||||
case deleted = "deleted"
|
||||
case new = "new"
|
||||
|
||||
public init(_ articleStatusKey: ArticleStatus.Key) {
|
||||
switch articleStatusKey {
|
||||
case .read:
|
||||
self = Self.read
|
||||
case .starred:
|
||||
self = Self.starred
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public let articleID: String
|
||||
public let key: ArticleStatus.Key
|
||||
public let key: SyncStatus.Key
|
||||
public let flag: Bool
|
||||
public let selected: Bool
|
||||
|
||||
public init(articleID: String, key: ArticleStatus.Key, flag: Bool, selected: Bool = false) {
|
||||
public init(articleID: String, key: SyncStatus.Key, flag: Bool, selected: Bool = false) {
|
||||
self.articleID = articleID
|
||||
self.key = key
|
||||
self.flag = flag
|
||||
|
||||
Reference in New Issue
Block a user