From 3e373886047e38946ddfa574e01bccbd1835e6eb Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 1 Apr 2024 23:11:30 -0700 Subject: [PATCH] Fix concurrency warning in IconImage. Make RSImage.appIconImage let instead of var. --- Shared/Extensions/RSImage-AppIcons.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/Extensions/RSImage-AppIcons.swift b/Shared/Extensions/RSImage-AppIcons.swift index 2015d1284..49caf3b65 100644 --- a/Shared/Extensions/RSImage-AppIcons.swift +++ b/Shared/Extensions/RSImage-AppIcons.swift @@ -10,7 +10,7 @@ import Foundation import Core extension RSImage { - static var appIconImage: RSImage? { + static let appIconImage: RSImage? = { #if os(macOS) return RSImage(named: NSImage.applicationIconName) #elseif os(iOS) @@ -23,11 +23,11 @@ extension RSImage { } return nil #endif - } + }() } extension IconImage { - static let appIcon: IconImage? = { + @MainActor static let appIcon: IconImage? = { if let image = RSImage.appIconImage { return IconImage(image) }