Page MenuHomeMusing Studio

No OneTemporary

diff --git a/Shared/Navigation/WFNavigation.swift b/Shared/Navigation/WFNavigation.swift
index c29a72f..5042f3c 100644
--- a/Shared/Navigation/WFNavigation.swift
+++ b/Shared/Navigation/WFNavigation.swift
@@ -1,26 +1,37 @@
import SwiftUI
struct WFNavigation<CollectionList, PostList, PostDetail>: View
where CollectionList: View, PostList: View, PostDetail: View {
- @ViewBuilder var collectionList: () -> CollectionList
- @ViewBuilder var postList: () -> PostList
- @ViewBuilder var postDetail: () -> PostDetail
+
+ 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 #available(iOS 16, macOS 13, *) {
NavigationSplitView {
- collectionList()
+ collectionList
} content: {
- postList()
+ postList
} detail: {
- postDetail()
+ postDetail
}
} else {
NavigationView {
- collectionList()
- postList()
- postDetail()
+ collectionList
+ postList
+ postDetail
}
}
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, May 16, 3:11 AM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3239962

Event Timeline