From ebb68009eeddd16e5b55c8777b9ed669b1abd30f Mon Sep 17 00:00:00 2001 From: david-swift Date: Sun, 29 Sep 2024 18:56:05 +0200 Subject: [PATCH] Make widget data commit to sendable --- Sources/Model/User Interface/View/WidgetData.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Model/User Interface/View/WidgetData.swift b/Sources/Model/User Interface/View/WidgetData.swift index 6c1e1aa..3935aa1 100644 --- a/Sources/Model/User Interface/View/WidgetData.swift +++ b/Sources/Model/User Interface/View/WidgetData.swift @@ -6,16 +6,16 @@ // /// Data passed to widgets when initializing or updating the container. -public struct WidgetData { +public struct WidgetData: Sendable { /// The view modifiers. - public var modifiers: [(AnyView) -> AnyView] = [] + public var modifiers: [@Sendable (AnyView) -> AnyView] = [] /// The scene storage of the parent scene element. public var sceneStorage: SceneStorage /// The app storage of the parent app. public var appStorage: any AppStorage /// Fields for custom data. - public var fields: [String: Any] = [:] + public var fields: [String: Sendable] = [:] /// Modify the data so that there are no modifiers. public var noModifiers: Self {