From cb2be259c435cedb1275344064b774b00f8f9c6c Mon Sep 17 00:00:00 2001 From: Zhen Li Date: Sun, 25 Aug 2024 18:32:19 -0400 Subject: [PATCH] Zero concurrency warnings --- .../Grape/Modifiers/GraphForegroundScale.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Sources/Grape/Modifiers/GraphForegroundScale.swift b/Sources/Grape/Modifiers/GraphForegroundScale.swift index bc0f5ed..8b3f4c9 100644 --- a/Sources/Grape/Modifiers/GraphForegroundScale.swift +++ b/Sources/Grape/Modifiers/GraphForegroundScale.swift @@ -2,8 +2,20 @@ import SwiftUI extension EnvironmentValues { @usableFromInline - @Entry - var graphForegroundScaleEnvironment: [AnyHashable: GraphicsContext.Shading] = [:] + var graphForegroundScaleEnvironment: [AnyHashable: GraphicsContext.Shading] + { + get { + self[__Key_graphForegroundScaleEnvironment.self] + } + set { + self[__Key_graphForegroundScaleEnvironment.self] = newValue + } + } + + private struct __Key_graphForegroundScaleEnvironment: SwiftUICore.EnvironmentKey { + typealias Value = [AnyHashable: GraphicsContext.Shading] + static var defaultValue: Value { [:] } + } } @usableFromInline