From 29ca8d6182fcea313892aafc7fbe8f9ad2f59430 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Mon, 7 Oct 2024 15:54:58 -0700 Subject: [PATCH] Add explicit `@MainActor` to `Button` initializer This works around a regression in behavior introduced by Xcode 16 beta 3. --- Sources/SwiftNavigation/ButtonState.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/SwiftNavigation/ButtonState.swift b/Sources/SwiftNavigation/ButtonState.swift index 86fec8a1f..451353ee5 100644 --- a/Sources/SwiftNavigation/ButtonState.swift +++ b/Sources/SwiftNavigation/ButtonState.swift @@ -321,6 +321,7 @@ extension ButtonState: Sendable where Action: Sendable {} /// - button: Button state. /// - action: An action closure that is invoked when the button is tapped. @available(iOS 15, macOS 12, tvOS 15, watchOS 8, *) + @MainActor public init(_ button: ButtonState, action: @escaping (Action?) -> Void) { self.init( role: button.role.map(ButtonRole.init),