summaryrefslogtreecommitdiff
path: root/Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2024-02-22 14:13:53 -0500
committerShav Kinderlehrer <[email protected]>2024-02-22 14:13:53 -0500
commit33b07566cbc07295131e9fe0e14643fbd9c5d14a (patch)
treecfdcf1ea68a9965f6301979bb7de5a3d18f29650 /Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift
parent1ce620567c64c92872261317863695c4660acbd0 (diff)
downloadjel-33b07566cbc07295131e9fe0e14643fbd9c5d14a.tar.gz
jel-33b07566cbc07295131e9fe0e14643fbd9c5d14a.zip
Revamp EpisodeIconView + format item.overview properly
Some metadata sources use '<br>' instead of '\n' for newlines. This fixes that for the most part.
Diffstat (limited to 'Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift')
-rw-r--r--Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift24
1 files changed, 12 insertions, 12 deletions
diff --git a/Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift b/Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift
index 9217bea..c198e66 100644
--- a/Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift
+++ b/Jel/Views/Item/Series/ItemSeriesEpisodeIconView.swift
@@ -14,30 +14,30 @@ struct ItemSeriesEpisodeIconView: View {
@EnvironmentObject var size: ScreenSize
- var iconWidthMultiplier: CGFloat = 0.35
+ var iconWidthMultiplier: CGFloat = 0.5
var body: some View {
VStack(alignment: .leading) {
- HStack(alignment: .top) {
- ItemIconView(item: item, width: (size.size.width * iconWidthMultiplier), height: (size.size.width * iconWidthMultiplier) / 1.7)
+ HStack {
+ ItemIconView(item: item,
+ width: (size.size.width * iconWidthMultiplier),
+ height: (size.size.width * iconWidthMultiplier) / 1.7,
+ contentMode: .fill)
VStack(alignment: .leading) {
Text("Episode \(item.indexNumber ?? 0)")
- .foregroundStyle(Color.secondary)
- .font(.caption)
- Text(item.name ?? "---")
- .bold()
- .lineLimit(nil)
-
- Text(item.overview ?? "")
- .foregroundStyle(Color.secondary)
+ .foregroundStyle(.secondary)
.font(.callout)
- Spacer()
+ Text(item.name ?? "---")
+ .bold()
}
.frame(height: (size.size.width * iconWidthMultiplier) / 1.7)
}
+ ExpandableText((item.overviewNL ?? "").replacingOccurrences(of: "<br>", with: "\n"))
+ .foregroundColor(.secondary)
}
+ .padding(.vertical)
}
}