Add @MainActor to some of the hook points.

This commit is contained in:
Doug
2025-11-14 14:05:38 +00:00
committed by Stefan Ceriu
parent 449349ce36
commit 022bc76c52
8 changed files with 35 additions and 33 deletions
@@ -40,7 +40,7 @@ public class CompoundColors {
/// Customise the colour at the specified key path with the supplied colour.
/// Supplying `nil` as the colour will remove any existing customisation.
public func override(_ keyPath: KeyPath<CompoundColorTokens, Color>, with color: Color?) {
@MainActor public func override(_ keyPath: KeyPath<CompoundColorTokens, Color>, with color: Color?) {
overrides[keyPath] = color
}
@@ -35,7 +35,7 @@ public class CompoundUIColors {
/// Customise the colour at the specified key path with the supplied colour.
/// Supplying `nil` as the colour will remove any existing customisation.
public func override(_ keyPath: KeyPath<CompoundUIColorTokens, UIColor>, with color: UIColor?) {
@MainActor public func override(_ keyPath: KeyPath<CompoundUIColorTokens, UIColor>, with color: UIColor?) {
overrides[keyPath] = color
}