Set default itemIconView placeholder

This commit is contained in:
Shav Kinderlehrer 2024-02-12 11:51:06 -05:00
parent 816cec03c0
commit 2d9d946bae
2 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,7 @@ struct ItemIconView: View {
@State var imageUrl: URL? @State var imageUrl: URL?
@State var contentMode: ContentMode = .fit @State var contentMode: ContentMode = .fit
var placeHolder: AnyView? var placeHolder: AnyView? = AnyView(Color(uiColor: UIColor.secondarySystemBackground))
var shouldShowCaption: Bool = false var shouldShowCaption: Bool = false
var imageCornerRadius: CGFloat = 5 var imageCornerRadius: CGFloat = 5

View File

@ -43,7 +43,7 @@ struct ItemPersonView: View {
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(item.name ?? "---") Text(item.name ?? "---")
.font(.title) .font(.title)
.padding() .padding([.horizontal, .top])
if let overview = item.overview { if let overview = item.overview {
ExpandableText(overview) ExpandableText(overview)
@ -52,7 +52,6 @@ struct ItemPersonView: View {
} }
if let items = items { if let items = items {
// TODO: Extract to view to maintain DRY
let movies = items.filter({$0.type == .movie}) let movies = items.filter({$0.type == .movie})
if movies.count > 0 { if movies.count > 0 {
Text("Movies") Text("Movies")