From 9d6d15bd93a08032d83cc5f22dffb1675ef38f65 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 1 Apr 2024 22:50:03 -0700 Subject: [PATCH] Fix a couple concurrency warnings. --- Account/Sources/Account/Account.swift | 2 +- Shared/SidebarItem/SidebarItem.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Account/Sources/Account/Account.swift b/Account/Sources/Account/Account.swift index e05b26ac6..1d28a8597 100644 --- a/Account/Sources/Account/Account.swift +++ b/Account/Sources/Account/Account.swift @@ -33,7 +33,7 @@ public extension Notification.Name { static let StatusesDidChange = Notification.Name(rawValue: "StatusesDidChange") } -public enum AccountType: Int, Codable { +public enum AccountType: Int, Codable, Sendable { // Raw values should not change since they’re stored on disk. case onMyMac = 1 case cloudKit = 2 diff --git a/Shared/SidebarItem/SidebarItem.swift b/Shared/SidebarItem/SidebarItem.swift index a4bf8771b..85d124680 100644 --- a/Shared/SidebarItem/SidebarItem.swift +++ b/Shared/SidebarItem/SidebarItem.swift @@ -19,12 +19,12 @@ enum ReadFilterType { protocol SidebarItem: SidebarItemIdentifiable, ArticleFetcher, DisplayNameProvider, UnreadCountProvider { var account: Account? { get } - var defaultReadFilterType: ReadFilterType { get } + @MainActor var defaultReadFilterType: ReadFilterType { get } } extension SidebarItem { - func readFiltered(readFilterEnabledTable: [SidebarItemIdentifier: Bool]) -> Bool { + @MainActor func readFiltered(readFilterEnabledTable: [SidebarItemIdentifier: Bool]) -> Bool { guard defaultReadFilterType != .alwaysRead else { return true }