diff --git a/Account/Sources/Account/ContainerIdentifier.swift b/Account/Sources/Account/ContainerIdentifier.swift index 0db60e6d4..55dced932 100644 --- a/Account/Sources/Account/ContainerIdentifier.swift +++ b/Account/Sources/Account/ContainerIdentifier.swift @@ -12,7 +12,7 @@ public protocol ContainerIdentifiable { var containerID: ContainerIdentifier? { get } } -public enum ContainerIdentifier: Hashable, Equatable { +public enum ContainerIdentifier: Hashable, Equatable, Sendable { case smartFeedController case account(String) // accountID case folder(String, String) // accountID, folderName diff --git a/AppKitExtras/Sources/AppKitExtras/NSPasteboard+RSCore.swift b/AppKitExtras/Sources/AppKitExtras/NSPasteboard+RSCore.swift index b22696b29..699424734 100644 --- a/AppKitExtras/Sources/AppKitExtras/NSPasteboard+RSCore.swift +++ b/AppKitExtras/Sources/AppKitExtras/NSPasteboard+RSCore.swift @@ -10,7 +10,7 @@ import AppKit public extension NSPasteboard { - func copyObjects(_ objects: [Any]) { + @MainActor func copyObjects(_ objects: [Any]) { guard let writers = writersFor(objects) else { return @@ -54,7 +54,7 @@ public extension NSPasteboard { private extension NSPasteboard { - func writersFor(_ objects: [Any]) -> [NSPasteboardWriting]? { + @MainActor func writersFor(_ objects: [Any]) -> [NSPasteboardWriting]? { let writers = objects.compactMap { ($0 as? PasteboardWriterOwner)?.pasteboardWriter } return writers.isEmpty ? nil : writers diff --git a/AppKitExtras/Sources/AppKitExtras/PasteboardWriterOwner.swift b/AppKitExtras/Sources/AppKitExtras/PasteboardWriterOwner.swift index de4f2c3f9..461343058 100644 --- a/AppKitExtras/Sources/AppKitExtras/PasteboardWriterOwner.swift +++ b/AppKitExtras/Sources/AppKitExtras/PasteboardWriterOwner.swift @@ -10,6 +10,6 @@ import AppKit public protocol PasteboardWriterOwner { - var pasteboardWriter: NSPasteboardWriting { get } + @MainActor var pasteboardWriter: NSPasteboardWriting { get } } #endif diff --git a/Mac/Scriptability/MainWindowController+Scriptability.swift b/Mac/Scriptability/MainWindowController+Scriptability.swift index e83a29711..d3fa5b105 100644 --- a/Mac/Scriptability/MainWindowController+Scriptability.swift +++ b/Mac/Scriptability/MainWindowController+Scriptability.swift @@ -10,7 +10,8 @@ import Foundation import Articles protocol ScriptingMainWindowController { - var scriptingCurrentArticle: Article? { get } - var scriptingSelectedArticles: [Article] { get } + + @MainActor var scriptingCurrentArticle: Article? { get } + @MainActor var scriptingSelectedArticles: [Article] { get } } diff --git a/Shared/SmartFeeds/SmartFeedsController.swift b/Shared/SmartFeeds/SmartFeedsController.swift index 56e1dce82..4d428134a 100644 --- a/Shared/SmartFeeds/SmartFeedsController.swift +++ b/Shared/SmartFeeds/SmartFeedsController.swift @@ -10,16 +10,14 @@ import Foundation import Account import Core -final class SmartFeedsController: DisplayNameProvider, ContainerIdentifiable { - - var containerID: ContainerIdentifier? { - return ContainerIdentifier.smartFeedController - } +@MainActor final class SmartFeedsController: DisplayNameProvider, ContainerIdentifiable { + + let containerID: ContainerIdentifier? = ContainerIdentifier.smartFeedController public static let shared = SmartFeedsController() let nameForDisplay = NSLocalizedString("Smart Feeds", comment: "Smart Feeds group title") - var smartFeeds = [SidebarItem]() + let smartFeeds: [SidebarItem] let todayFeed = SmartFeed(delegate: TodayFeedDelegate()) let unreadFeed = UnreadFeed() let starredFeed = SmartFeed(delegate: StarredFeedDelegate())