1
0
mirror of https://github.com/yattee/yattee.git synced 2025-04-28 07:50:33 +05:30

iOS - the description header is a button now

This commit is contained in:
Toni Förster 2023-11-25 21:58:42 +01:00
parent ed5fa8e4aa
commit 6994271eca
No known key found for this signature in database
GPG Key ID: 292F3E5086C83FC7

View File

@ -410,18 +410,34 @@ struct VideoDetails: View {
} }
var descriptionHeader: some View { var descriptionHeader: some View {
HStack { #if canImport(UIKit)
Text("Description".localized()) Button(action: {
Spacer() descriptionExpanded.toggle()
Button { descriptionExpanded.toggle() }) {
} label: { HStack {
Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down") Text("Description".localized())
.imageScale(.small) Spacer()
Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
} }
} #elseif canImport(AppKit)
.padding(.horizontal) HStack {
.font(.caption) Text("Description".localized())
.foregroundColor(.secondary) Spacer()
Button { descriptionExpanded.toggle()
} label: {
Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
}
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
#endif
} }
var chaptersHeader: some View { var chaptersHeader: some View {