Skip to content

Commit d1d506a

Browse files
authored
Merge pull request #5 from shapehq/fix/hans-shape/main_actor_spice_dispenser
Make some properties of SpiceDispenser MainActor
2 parents 415f448 + ddb9ec1 commit d1d506a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

SHPSpices/Source/Spice/SpiceDispenser.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ enum SpiceDispenserProperty {
1313
case spice(String, SpiceType)
1414
}
1515

16-
public protocol SpiceDispenser: class {
17-
var store: UserDefaults { get }
16+
public protocol SpiceDispenser: AnyObject {
17+
@MainActor var store: UserDefaults { get }
1818
var title: String? { get }
1919
}
2020

@@ -29,11 +29,13 @@ public extension SpiceDispenser {
2929
return .standard
3030
}
3131

32+
@MainActor
3233
func prepare(with application: UIApplication? = nil) {
3334
recursivePrepare(with: application, rootSpiceDispenser: self, path: [])
3435
validateValues()
3536
}
3637

38+
@MainActor
3739
internal func recursivePrepare(with application: UIApplication?, rootSpiceDispenser: SpiceDispenser, path: [String]) {
3840
properties().forEach { property in
3941
switch property {

0 commit comments

Comments
 (0)