From 4487b9c494510aaa2d3413c6c19be6e709e49036 Mon Sep 17 00:00:00 2001 From: Ahmed Shendy Date: Wed, 25 Sep 2024 00:39:56 +0300 Subject: [PATCH] fix: Call to main actor-isolated initializer --- Sources/FeedbackKit/FeedbackStore.swift | 1 + Sources/FeedbackKit/FeedbackViewModel.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/FeedbackKit/FeedbackStore.swift b/Sources/FeedbackKit/FeedbackStore.swift index ae9b06e..7a0f425 100644 --- a/Sources/FeedbackKit/FeedbackStore.swift +++ b/Sources/FeedbackKit/FeedbackStore.swift @@ -3,6 +3,7 @@ import Cache import Foundation extension Application { + @MainActor fileprivate var storedFeedback: FileState<[UUID: Feedback]> { fileState(initial: [:], filename: "storedFeedback") } diff --git a/Sources/FeedbackKit/FeedbackViewModel.swift b/Sources/FeedbackKit/FeedbackViewModel.swift index cde2eeb..13fd248 100644 --- a/Sources/FeedbackKit/FeedbackViewModel.swift +++ b/Sources/FeedbackKit/FeedbackViewModel.swift @@ -1,6 +1,7 @@ import Combine import SwiftUI +@MainActor class FeedbackViewModel: ObservableObject { private var bag: Set