diff --git a/Mac/Activity/ActivityLogWindowController.swift b/Mac/Activity/ActivityLogWindowController.swift index 1d66d39e0..b8d3fc3c1 100644 --- a/Mac/Activity/ActivityLogWindowController.swift +++ b/Mac/Activity/ActivityLogWindowController.swift @@ -499,9 +499,42 @@ private extension ActivityLogWindowController { return "Downloading avatar \(avatarURL)" case .downloadHTMLMetadata(let urlString): return "Downloading metadata \(urlString)" + case .subscribeFeed: + return descriptionWithDetail("Subscribing to feed", activity: activity) + case .renameFeed: + return descriptionWithDetail("Renaming feed", activity: activity) + case .removeFeed: + return descriptionWithDetail("Removing feed", activity: activity) + case .moveFeed: + return descriptionWithDetail("Moving feed", activity: activity) + case .addFeed: + return descriptionWithDetail("Adding feed", activity: activity) + case .createFolder: + return descriptionWithDetail("Creating folder", activity: activity) + case .renameFolder: + return descriptionWithDetail("Renaming folder", activity: activity) + case .removeFolder: + return descriptionWithDetail("Removing folder", activity: activity) + case .restoreFolder: + return descriptionWithDetail("Restoring folder", activity: activity) + case .markArticles: + return descriptionWithDetail("Marking articles", activity: activity) + case .cleanUpCloudKitRecords: + return "Weekly record cleanup" + case .uploadNewArticles: + return descriptionWithDetail("Uploading new articles", activity: activity) + case .subscribeToCloudKitZone: + return descriptionWithDetail("Subscribing to zone changes", activity: activity) } } + private func descriptionWithDetail(_ prefix: String, activity: Activity) -> String { + if let detail = activity.detail { + return "\(prefix): \(detail)" + } + return prefix + } + func color(for owner: ActivityOwner) -> NSColor { switch owner { case .account(let accountID): diff --git a/Mac/Activity/ActivityWindowController.swift b/Mac/Activity/ActivityWindowController.swift index 463041909..47c5b36fc 100644 --- a/Mac/Activity/ActivityWindowController.swift +++ b/Mac/Activity/ActivityWindowController.swift @@ -460,6 +460,32 @@ private extension ActivityWindowController { return NSLocalizedString("Refreshing missing articles", comment: "Activity kind") case .importOPML: return NSLocalizedString("Importing OPML", comment: "Activity kind") + case .subscribeFeed: + return NSLocalizedString("Subscribing to feed", comment: "Activity kind") + case .renameFeed: + return NSLocalizedString("Renaming feed", comment: "Activity kind") + case .removeFeed: + return NSLocalizedString("Removing feed", comment: "Activity kind") + case .moveFeed: + return NSLocalizedString("Moving feed", comment: "Activity kind") + case .addFeed: + return NSLocalizedString("Adding feed", comment: "Activity kind") + case .createFolder: + return NSLocalizedString("Creating folder", comment: "Activity kind") + case .renameFolder: + return NSLocalizedString("Renaming folder", comment: "Activity kind") + case .removeFolder: + return NSLocalizedString("Removing folder", comment: "Activity kind") + case .restoreFolder: + return NSLocalizedString("Restoring folder", comment: "Activity kind") + case .markArticles: + return NSLocalizedString("Marking articles", comment: "Activity kind") + case .cleanUpCloudKitRecords: + return NSLocalizedString("Weekly record cleanup", comment: "Activity kind") + case .uploadNewArticles: + return NSLocalizedString("Uploading new articles", comment: "Activity kind") + case .subscribeToCloudKitZone: + return NSLocalizedString("Subscribing to zone changes", comment: "Activity kind") case .refreshFeedContent, .findFeed, .downloadFeedImage, .downloadFavicon, .downloadAvatar, .downloadHTMLMetadata: return "" } diff --git a/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift b/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift index 06db3ab9f..b86eb837c 100644 --- a/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift +++ b/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift @@ -18,6 +18,25 @@ public enum ActivityKind: Sendable, Hashable { case refreshMissingArticles case importOPML + // CloudKit user-action edits + + case subscribeFeed + case renameFeed + case removeFeed + case moveFeed + case addFeed + case createFolder + case renameFolder + case removeFolder + case restoreFolder + + // CloudKit background work + + case markArticles + case cleanUpCloudKitRecords + case uploadNewArticles + case subscribeToCloudKitZone + // App-level case refreshAll