Skip to content

Commit

Permalink
Corrects macOS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpatrickmorgan committed Dec 30, 2021
1 parent c000def commit 6d04318
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/FlowStacks/Combined/Node.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ indirect enum Node<Screen, V: View>: View {
/// the navigation view style is forced to `stack` where possible.
private var supportedNavigationViewStyle: some NavigationViewStyle {
#if os(macOS)
.default
.automatic
#else
.stack
#endif
Expand Down
13 changes: 8 additions & 5 deletions Sources/FlowStacks/Combined/Route.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public enum Route<Screen> {
self = .push(newValue)
case .sheet(_, let embedInNavigationView):
self = .sheet(newValue, embedInNavigationView: embedInNavigationView)
#if os(macOS)
#else
case .cover(_, let embedInNavigationView):
self = .cover(newValue, embedInNavigationView: embedInNavigationView)
#endif
#if os(macOS)
#else
case .cover(_, let embedInNavigationView):
self = .cover(newValue, embedInNavigationView: embedInNavigationView)
#endif
}
}
}
Expand Down Expand Up @@ -73,8 +73,11 @@ public enum Route<Screen> {
return .push(transform(screen))
case .sheet(_, let embedInNavigationView):
return .sheet(transform(screen), embedInNavigationView: embedInNavigationView)
#if os(macOS)
#else
case .cover(_, let embedInNavigationView):
return .cover(transform(screen), embedInNavigationView: embedInNavigationView)
#endif
}
}
}
Expand Down

0 comments on commit 6d04318

Please sign in to comment.