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: 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 } }