diff --git a/Core/Sources/Core/RSImage.swift b/Core/Sources/Core/RSImage.swift index ea768ce58..66ceba525 100644 --- a/Core/Sources/Core/RSImage.swift +++ b/Core/Sources/Core/RSImage.swift @@ -62,7 +62,7 @@ public extension RSImage { /// /// - Parameter color: The color to use to tint the image. /// - Returns: The tinted image. - func tinted(color: UIColor) -> UIImage? { + @MainActor func tinted(color: UIColor) -> UIImage? { let image = withRenderingMode(.alwaysTemplate) let imageView = UIImageView(image: image) imageView.tintColor = color diff --git a/Shared/AccountType+Helpers.swift b/Shared/AccountType+Helpers.swift index dd5d04083..0232defff 100644 --- a/Shared/AccountType+Helpers.swift +++ b/Shared/AccountType+Helpers.swift @@ -19,7 +19,7 @@ extension AccountType { // TODO: Move this to the Account Package. - func localizedAccountName() -> String { + @MainActor func localizedAccountName() -> String { switch self { case .onMyMac: @@ -54,7 +54,7 @@ extension AccountType { } // MARK: - SwiftUI Images - func image() -> Image { + @MainActor func image() -> Image { switch self { case .onMyMac: // If it's the multiplatform app, the asset catalog contains assets for diff --git a/Shared/SidebarItem/SidebarItem.swift b/Shared/SidebarItem/SidebarItem.swift index 85d124680..85044412c 100644 --- a/Shared/SidebarItem/SidebarItem.swift +++ b/Shared/SidebarItem/SidebarItem.swift @@ -18,7 +18,7 @@ enum ReadFilterType { protocol SidebarItem: SidebarItemIdentifiable, ArticleFetcher, DisplayNameProvider, UnreadCountProvider { - var account: Account? { get } + @MainActor var account: Account? { get } @MainActor var defaultReadFilterType: ReadFilterType { get } } diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index d12c6776c..cb361d48a 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -39,7 +39,7 @@ struct AppAssets { static let articleExtractorOffSF = UIImage(systemName: "doc.plaintext")! - static let articleExtractorOffTinted: UIImage = { + @MainActor static let articleExtractorOffTinted: UIImage = { let image = UIImage(named: "articleExtractorOff")! return image.tinted(color: AppAssets.primaryAccentColor)! }() @@ -48,7 +48,7 @@ struct AppAssets { static let articleExtractorOnSF = UIImage(named: "articleExtractorOnSF")! - static let articleExtractorOnTinted: UIImage = { + @MainActor static let articleExtractorOnTinted: UIImage = { let image = UIImage(named: "articleExtractorOn")! return image.tinted(color: AppAssets.primaryAccentColor)! }() diff --git a/iOS/Article/ArticleExtractorButton.swift b/iOS/Article/ArticleExtractorButton.swift index cc1087888..6c822838e 100644 --- a/iOS/Article/ArticleExtractorButton.swift +++ b/iOS/Article/ArticleExtractorButton.swift @@ -15,7 +15,7 @@ enum ArticleExtractorButtonState { case off } -class ArticleExtractorButton: UIButton { +@MainActor final class ArticleExtractorButton: UIButton { private var animatedLayer: CALayer? diff --git a/iOS/UIKit Extensions/Animations.swift b/iOS/UIKit Extensions/Animations.swift index e43d83a5c..c98e0dd1e 100644 --- a/iOS/UIKit Extensions/Animations.swift +++ b/iOS/UIKit Extensions/Animations.swift @@ -9,7 +9,7 @@ import Foundation /// Used to select which animations should be performed -public struct Animations: OptionSet { +public struct Animations: OptionSet, Sendable { /// Select and deslections will be animated. public static let select = Animations(rawValue: 1)