Page MenuHomeMusing Studio

No OneTemporary

diff --git a/Shared/Navigation/WFNavigation.swift b/Shared/Navigation/WFNavigation.swift
index b5b0d56..e3ee29f 100644
--- a/Shared/Navigation/WFNavigation.swift
+++ b/Shared/Navigation/WFNavigation.swift
@@ -1,37 +1,39 @@
import SwiftUI
struct WFNavigation<CollectionList, PostList, PostDetail>: View
where CollectionList: View, PostList: View, PostDetail: View {
private var collectionList: CollectionList
private var postList: PostList
private var postDetail: PostDetail
init(
@ViewBuilder collectionList: () -> CollectionList,
@ViewBuilder postList: () -> PostList,
@ViewBuilder postDetail: () -> PostDetail
) {
self.collectionList = collectionList()
self.postList = postList()
self.postDetail = postDetail()
}
var body: some View {
- #if os(macOS)
- NavigationSplitView {
- collectionList
- } content: {
- postList
- } detail: {
- postDetail
+ if #available(iOS 16, macOS 13, *) {
+ /// This works better in iOS 17.5 but still has some issues:
+ /// - Does not respect the editor-launching policy, going right to the NoSelectedPostView
+ NavigationSplitView {
+ collectionList
+ } content: {
+ postList
+ } detail: {
+ postDetail
+ }
+ } else {
+ NavigationView {
+ collectionList
+ postList
+ postDetail
+ }
}
- #else
- NavigationView {
- collectionList
- postList
- postDetail
- }
- #endif
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, Jan 31, 2:50 PM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3144871

Event Timeline