commit 71a1a6f0a329ed02e043be0a1995edcc6ad868c9
parent 9d22f40a531072b1847f79f5ee2fd85f55dae3b1
Author: William Casarin <jb55@jb55.com>
Date: Fri, 21 Apr 2023 17:45:58 -0700
Add some default height to images
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/damus/Components/ImageCarousel.swift b/damus/Components/ImageCarousel.swift
@@ -66,7 +66,7 @@ struct ImageCarousel: View {
}
var height: CGFloat {
- image_fill?.height ?? 0
+ image_fill?.height ?? 100
}
var body: some View {
@@ -118,10 +118,7 @@ extension KFOptionSetter {
let modifier = AnyImageModifier { image -> KFCrossPlatformImage in
let img_size = image.size
let geo_size = size
- let fill = ImageFill.calculate_image_fill(geo_size: geo_size,
- img_size: img_size,
- maxHeight: max,
- fillHeight: fill)
+ let fill = ImageFill.calculate_image_fill(geo_size: geo_size, img_size: img_size, maxHeight: max, fillHeight: fill)
DispatchQueue.main.async { [block, fill] in
try? block(fill)
}