set nav bar hidded modifier on the navlink view
This commit is contained in:
@ -11,9 +11,16 @@ struct FeedCardNavigationLink: View {
|
||||
@ObservedObject var viewModel: HomeFeedViewModel
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
let destination = LinkItemDetailView(viewModel: LinkItemDetailViewModel(item: item, homeFeedViewModel: viewModel))
|
||||
#if os(iOS)
|
||||
let modifiedDestination = destination.navigationBarHidden(true)
|
||||
#else
|
||||
let modifiedDestination = destination
|
||||
#endif
|
||||
|
||||
return ZStack {
|
||||
NavigationLink(
|
||||
destination: LinkItemDetailView(viewModel: LinkItemDetailViewModel(item: item, homeFeedViewModel: viewModel)),
|
||||
destination: modifiedDestination,
|
||||
tag: item,
|
||||
selection: $viewModel.selectedLinkItem
|
||||
) {
|
||||
@ -42,9 +49,16 @@ struct GridCardNavigationLink: View {
|
||||
@ObservedObject var viewModel: HomeFeedViewModel
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
let destination = LinkItemDetailView(viewModel: LinkItemDetailViewModel(item: item, homeFeedViewModel: viewModel))
|
||||
#if os(iOS)
|
||||
let modifiedDestination = destination.navigationBarHidden(true)
|
||||
#else
|
||||
let modifiedDestination = destination
|
||||
#endif
|
||||
|
||||
return ZStack {
|
||||
NavigationLink(
|
||||
destination: LinkItemDetailView(viewModel: LinkItemDetailViewModel(item: item, homeFeedViewModel: viewModel)),
|
||||
destination: modifiedDestination,
|
||||
tag: item,
|
||||
selection: $viewModel.selectedLinkItem
|
||||
) {
|
||||
|
||||
@ -248,9 +248,7 @@ struct LinkItemDetailView: View {
|
||||
navBar
|
||||
Spacer()
|
||||
}
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
|
||||
} else {
|
||||
VStack(spacing: 0) {
|
||||
navBar
|
||||
@ -262,7 +260,6 @@ struct LinkItemDetailView: View {
|
||||
rawAuthCookie: authenticator.omnivoreAuthCookieString
|
||||
)
|
||||
}
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -222,13 +222,10 @@ import WebKit
|
||||
navBar
|
||||
Spacer()
|
||||
}
|
||||
.navigationBarHidden(true)
|
||||
|
||||
}.onDisappear {
|
||||
// Clear the shared webview content when exiting
|
||||
WebViewManager.shared().loadHTMLString("<html></html>", baseURL: nil)
|
||||
}
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user