From 25f161966cb552a5245e8e0ec0160a18e4f40a84 Mon Sep 17 00:00:00 2001 From: Neil Clayton Date: Thu, 25 Jul 2024 12:26:40 +1200 Subject: [PATCH] - needs @MainActor for earlier xcode --- Sources/KeyboardShortcuts/SwiftUI+Extensions.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/KeyboardShortcuts/SwiftUI+Extensions.swift b/Sources/KeyboardShortcuts/SwiftUI+Extensions.swift index c53e63fa..236c1799 100644 --- a/Sources/KeyboardShortcuts/SwiftUI+Extensions.swift +++ b/Sources/KeyboardShortcuts/SwiftUI+Extensions.swift @@ -30,6 +30,7 @@ extension KeyboardShortcuts.Shortcut { // Holds the state of the shortcut, and changes that state when the shortcut changes // This causes the related NSMenuItem to also update (yipeee) @available(macOS 12.3, *) +@MainActor struct KeyboardShortcutView: View { @State private var shortcutName: KeyboardShortcuts.Name @State private var shortcut: KeyboardShortcuts.Shortcut?