summaryrefslogtreecommitdiff
path: root/Jel/Views/Library/LibraryIconView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Jel/Views/Library/LibraryIconView.swift')
-rw-r--r--Jel/Views/Library/LibraryIconView.swift10
1 files changed, 8 insertions, 2 deletions
diff --git a/Jel/Views/Library/LibraryIconView.swift b/Jel/Views/Library/LibraryIconView.swift
index 7651e56..a3f5b55 100644
--- a/Jel/Views/Library/LibraryIconView.swift
+++ b/Jel/Views/Library/LibraryIconView.swift
@@ -22,6 +22,8 @@ struct LibraryIconView: View {
@State var imageUrl: URL?
@State var contentMode: ContentMode = .fit
+ @State var placeHolder: AnyView?
+
var shouldShowCaption: Bool = true
var imageCornerRadius: CGFloat = 5
var body: some View {
@@ -33,8 +35,12 @@ struct LibraryIconView: View {
} else if state.error != nil {
Color.red
} else {
- Image(uiImage: blurHashImage)
- .resizable()
+ if let content = placeHolder {
+ content
+ } else {
+ Image(uiImage: blurHashImage)
+ .resizable()
+ }
}
}
.aspectRatio(contentMode: contentMode)