diff options
author | Shav Kinderlehrer <[email protected]> | 2023-12-24 02:36:14 -0500 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-12-24 02:36:14 -0500 |
commit | 9da269a6ab44869e41a8b005836c3479424ae538 (patch) | |
tree | e0efee5bc9e32e739aac19721db5ac727004cb80 /Jel/Views/Library/LibraryIconView.swift | |
parent | 0798bb71414e7eb77c14e3b46afa9a4eff9d8d80 (diff) | |
download | jel-9da269a6ab44869e41a8b005836c3479424ae538.tar.gz jel-9da269a6ab44869e41a8b005836c3479424ae538.zip |
Did something really awful to make bad effects
TODO: Overhaul all of this
Diffstat (limited to 'Jel/Views/Library/LibraryIconView.swift')
-rw-r--r-- | Jel/Views/Library/LibraryIconView.swift | 10 |
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) |