diff --git a/Account/Sources/Account/WebFeed.swift b/Account/Sources/Account/WebFeed.swift index d3a2604fe..cd10c3478 100644 --- a/Account/Sources/Account/WebFeed.swift +++ b/Account/Sources/Account/WebFeed.swift @@ -192,6 +192,15 @@ public final class WebFeed: Feed, Renamable, Hashable { } } + public var isSyncingPaused: Bool { + get { + return metadata.isSyncingPaused ?? false + } + set { + metadata.isSyncingPaused = newValue + } + } + // MARK: - DisplayNameProvider public var nameForDisplay: String { diff --git a/Account/Sources/Account/WebFeedMetadata.swift b/Account/Sources/Account/WebFeedMetadata.swift index aa381709f..66fab6663 100644 --- a/Account/Sources/Account/WebFeedMetadata.swift +++ b/Account/Sources/Account/WebFeedMetadata.swift @@ -30,6 +30,7 @@ final class WebFeedMetadata: Codable { case sinceToken case externalID = "subscriptionID" case folderRelationship + case isSyncingPaused } var webFeedID: String { @@ -136,6 +137,14 @@ final class WebFeedMetadata: Codable { } } } + + var isSyncingPaused: Bool? { + didSet { + if isSyncingPaused != oldValue { + valueDidChange(.isSyncingPaused) + } + } + } weak var delegate: WebFeedMetadataDelegate?