mirror of
https://github.com/yattee/yattee.git
synced 2025-01-09 06:17:10 +00:00
vertical chapters with images are always collapsed
This commit is contained in:
parent
a7baaeb485
commit
8f08674527
@ -15,7 +15,8 @@ struct ChaptersView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if expand && !chapters.isEmpty {
|
if !chapters.isEmpty {
|
||||||
|
if expand || chaptersHaveImages {
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
List {
|
List {
|
||||||
Section {
|
Section {
|
||||||
@ -38,18 +39,13 @@ struct ChaptersView: View {
|
|||||||
}
|
}
|
||||||
.frame(minHeight: ChapterView.thumbnailHeight + 100)
|
.frame(minHeight: ChapterView.thumbnailHeight + 100)
|
||||||
} else {
|
} else {
|
||||||
Section {
|
contents
|
||||||
ForEach(chapters) { chapter in
|
|
||||||
ChapterView(chapter: chapter)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.padding(.horizontal)
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} else if !chapters.isEmpty {
|
} else {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
Button(action: {
|
Button(action: {
|
||||||
self.expand.toggle() // Use your expanding logic here
|
self.expand.toggle()
|
||||||
}) {
|
}) {
|
||||||
contents
|
contents
|
||||||
}
|
}
|
||||||
@ -58,6 +54,7 @@ struct ChaptersView: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var contents: some View {
|
var contents: some View {
|
||||||
Section {
|
Section {
|
||||||
|
Loading…
Reference in New Issue
Block a user