Skip to content

Commit

Permalink
Annotate VaultModel with @mainactor (#473)
Browse files Browse the repository at this point in the history
- Eliminates: "[SwiftUI] Publishing changes from background threads is
not allowed; make sure to publish values from the main thread (via
operators like receive(on:)) on model updates." message.
  • Loading branch information
bolsinga authored Jul 12, 2023
1 parent 5c1a311 commit ffcac20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Site/Music/VaultModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension Logger {
static let vaultModel = Logger(category: "vaultModel")
}

public final class VaultModel: ObservableObject {
@MainActor public final class VaultModel: ObservableObject {
let url: URL

@Published var vault: Vault?
Expand Down

0 comments on commit ffcac20

Please sign in to comment.