mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-18 12:31:01 +01:00
Fix concurrency warnings.
This commit is contained in:
parent
3d83c7cfb6
commit
b64b1307b7
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }
|
||||
}
|
||||
|
||||
|
@ -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)!
|
||||
}()
|
||||
|
@ -15,7 +15,7 @@ enum ArticleExtractorButtonState {
|
||||
case off
|
||||
}
|
||||
|
||||
class ArticleExtractorButton: UIButton {
|
||||
@MainActor final class ArticleExtractorButton: UIButton {
|
||||
|
||||
private var animatedLayer: CALayer?
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user