Skip to content

Commit

Permalink
Fix detail page header padding
Browse files Browse the repository at this point in the history
  • Loading branch information
chihchy committed Oct 27, 2024
1 parent eeaf7e6 commit 30348d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions EhPanda/View/Detail/DetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct DetailView: View {
var body: some View {
ZStack {
ScrollView(showsIndicators: false) {
let content =
VStack(spacing: 30) {
HeaderSection(
gallery: store.gallery,
Expand Down Expand Up @@ -106,7 +107,14 @@ struct DetailView: View {
)
}
.padding(.bottom, 20)
.padding(.top, -25)

if #available(iOS 18.0, *) {
content
.padding(.top, 25)
} else {
content
.padding(.top, -25)
}
}
.opacity(store.galleryDetail == nil ? 0 : 1)
LoadingView()
Expand Down Expand Up @@ -298,8 +306,6 @@ private struct HeaderSection: View {
}

var body: some View {
Spacer()
.frame(height: 10)
HStack {
KFImage(gallery.coverURL)
.placeholder { Placeholder(style: .activity(ratio: Defaults.ImageSize.headerAspect)) }
Expand Down

0 comments on commit 30348d5

Please sign in to comment.