Skip to content

Commit 5d8992f

Browse files
committed
fix
1 parent 961be05 commit 5d8992f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Sources/ComposableArchitecture/SwiftUI/ConfirmationDialog.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,25 @@ private struct NewConfirmationDialogModifier<Action>: ViewModifier {
9090
}
9191

9292
@available(iOS 13, *)
93-
@available(macOS, unavailable)
93+
@available(macOS 12, *)
9494
@available(tvOS 13, *)
9595
@available(watchOS 6, *)
9696
private struct OldConfirmationDialogModifier<Action>: ViewModifier {
9797
@ObservedObject var viewStore: ViewStore<ConfirmationDialogState<Action>?, Action>
9898
let dismiss: Action
9999

100100
func body(content: Content) -> some View {
101-
content.actionSheet(item: viewStore.binding(send: dismiss)) {
102-
ActionSheet($0) { action in
103-
if let action = action {
104-
viewStore.send(action)
101+
#if !os(macOS)
102+
content.actionSheet(item: viewStore.binding(send: dismiss)) {
103+
ActionSheet($0) { action in
104+
if let action = action {
105+
viewStore.send(action)
106+
}
105107
}
106108
}
107-
}
109+
#else
110+
EmptyView()
111+
#endif
108112
}
109113
}
110114

0 commit comments

Comments
 (0)