Fixed episode chunk alignment

This commit is contained in:
cranci1 2025-07-07 10:27:25 +02:00
parent 5607ec70ff
commit f6f9bcaa8f

View file

@ -540,19 +540,6 @@ struct MediaInfoView: View {
if episodeLinks.count != 1 { if episodeLinks.count != 1 {
VStack(alignment: .leading, spacing: 16) { VStack(alignment: .leading, spacing: 16) {
episodesSectionHeader episodesSectionHeader
if isGroupedBySeasons || episodeLinks.count > episodeChunkSize {
HStack(spacing: 8) {
if isGroupedBySeasons {
seasonSelectorStyled
}
Spacer()
if episodeLinks.count > episodeChunkSize {
rangeSelectorStyled
.padding(.trailing, 4)
}
}
.padding(.top, -8)
}
episodeListSection episodeListSection
} }
} }
@ -614,6 +601,20 @@ struct MediaInfoView: View {
Spacer() Spacer()
HStack(spacing: 4) { HStack(spacing: 4) {
if isGroupedBySeasons || episodeLinks.count > episodeChunkSize {
HStack(spacing: 8) {
if isGroupedBySeasons {
seasonSelectorStyled
}
Spacer()
if episodeLinks.count > episodeChunkSize {
rangeSelectorStyled
.padding(.trailing, 4)
}
}
.padding(.top, -8)
}
sourceButton sourceButton
menuButton menuButton
} }
@ -715,10 +716,6 @@ struct MediaInfoView: View {
.foregroundColor(.primary) .foregroundColor(.primary)
Spacer() Spacer()
HStack(spacing: 4) { HStack(spacing: 4) {
sourceButton
menuButton
}
}
if chapters.count > chapterChunkSize { if chapters.count > chapterChunkSize {
HStack { HStack {
Spacer() Spacer()
@ -726,6 +723,12 @@ struct MediaInfoView: View {
} }
.padding(.bottom, 0) .padding(.bottom, 0)
} }
sourceButton
menuButton
}
}
LazyVStack(spacing: 15) { LazyVStack(spacing: 15) {
ForEach(chapters.indices.filter { selectedChapterRange.contains($0) }, id: \..self) { i in ForEach(chapters.indices.filter { selectedChapterRange.contains($0) }, id: \..self) { i in
let chapter = chapters[i] let chapter = chapters[i]