Merge pull request #182 from omnivore-app/feature/ipad-navbar-improvements

iPad navbar improvements
This commit is contained in:
Satindar Dhillon 2022-03-03 20:17:45 -08:00 committed by GitHub
commit dec888ce63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View file

@ -150,8 +150,8 @@
"repositoryURL": "https://github.com/maticzav/swift-graphql",
"state": {
"branch": null,
"revision": "716973b9af4fcce8cb5dd6ac5fda80aff1458b84",
"version": "2.3.0"
"revision": "b1fad45d10194e865685150fedad9ef0845fb254",
"version": "2.3.1"
}
},
{
@ -177,8 +177,8 @@
"repositoryURL": "https://github.com/siteline/SwiftUI-Introspect.git",
"state": {
"branch": null,
"revision": "2e09be8af614401bc9f87d40093ec19ce56ccaf2",
"version": "0.1.3"
"revision": "f2616860a41f9d9932da412a8978fec79c06fe24",
"version": "0.1.4"
}
},
{

View file

@ -19,8 +19,8 @@ let package = Package(
dependencies: [
.package(name: "AppAuth", url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMajor(from: "1.4.0")),
.package(url: "https://github.com/Square/Valet", from: "4.1.2"),
.package(url: "https://github.com/maticzav/swift-graphql", from: "2.3.0"),
.package(url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.3")
.package(url: "https://github.com/maticzav/swift-graphql", from: "2.3.1"),
.package(url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.4")
],
targets: [
.target(name: "App", dependencies: ["Views", "Services", "Models", "Utils"]),

View file

@ -137,13 +137,13 @@ struct LinkItemDetailView: View {
var body: some View {
#if os(iOS)
if UIDevice.isIPhone, !viewModel.item.isPDF {
compactInnerBody
if viewModel.item.isPDF {
fixedNavBarReader
} else {
innerBody
hidingNavBarReader
}
#else
innerBody
fixedNavBarReader
#endif
}
@ -176,7 +176,7 @@ struct LinkItemDetailView: View {
}
#if os(iOS)
@ViewBuilder private var compactInnerBody: some View {
@ViewBuilder private var hidingNavBarReader: some View {
if let webAppWrapperViewModel = viewModel.webAppWrapperViewModel {
ZStack {
WebAppWrapperView(
@ -232,7 +232,7 @@ struct LinkItemDetailView: View {
}
#endif
@ViewBuilder private var innerBody: some View {
@ViewBuilder private var fixedNavBarReader: some View {
if let pdfURL = viewModel.item.pdfURL {
#if os(iOS)
PDFProvider.pdfViewerProvider?(pdfURL, viewModel.item)