fix: Swift concurrency warning for ScrollOffsetPreferenceKey

Mark defaultValue as nonisolated(unsafe) to fix Xcode Cloud build error:
"Static property 'defaultValue' is not concurrency-safe because it is
nonisolated global shared mutable state"
This commit is contained in:
Thomas Marchand
2025-12-19 15:31:36 +00:00
parent 9c22c6dc2d
commit b28b6684b5

View File

@@ -688,7 +688,7 @@ struct ControlView: View {
// MARK: - Scroll Offset Preference Key
private struct ScrollOffsetPreferenceKey: PreferenceKey {
static var defaultValue: CGFloat = 0
nonisolated(unsafe) static var defaultValue: CGFloat = 0
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
value = nextValue()
}