Add @MainActor to some of the hook points.
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/element-hq/compound-design-tokens",
|
||||
"state" : {
|
||||
"revision" : "be5d26dfd4ad659b0d3b3aec1ad1cccd0dc8d063",
|
||||
"version" : "6.0.0"
|
||||
"revision" : "93b48b3c88473562fb42c34100e45df25a4aea97",
|
||||
"version" : "6.3.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import Foundation
|
||||
@testable import Compound
|
||||
import XCTest
|
||||
|
||||
@MainActor
|
||||
class OverrideColorTests: XCTestCase {
|
||||
func testSwiftUI() {
|
||||
let colors = CompoundColors()
|
||||
|
||||
Reference in New Issue
Block a user