File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed
Sources/StreamChatSwiftUI/ChatChannel Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ struct GalleryView: View {
45
45
LazyLoadingImage (
46
46
source: url,
47
47
width: reader. size. width,
48
+ height: reader. size. height,
48
49
resize: true ,
49
50
onImageLoaded: { image in
50
51
loadedImages [ index] = image
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ struct GridPhotosView: View {
34
34
ForEach ( imageURLs, id: \. self) { url in
35
35
LazyLoadingImage (
36
36
source: url,
37
- width: Self . itemWidth
37
+ width: Self . itemWidth,
38
+ height: Self . itemWidth
38
39
)
39
40
. frame (
40
41
width: Self . itemWidth,
Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ struct SingleImageView: View {
246
246
LazyLoadingImage (
247
247
source: source,
248
248
width: width,
249
+ height: 3 * width / 4 ,
249
250
imageTapped: imageTapped,
250
251
index: index
251
252
)
@@ -264,6 +265,7 @@ struct MultiImageView: View {
264
265
LazyLoadingImage (
265
266
source: source,
266
267
width: width,
268
+ height: height,
267
269
imageTapped: imageTapped,
268
270
index: index
269
271
)
@@ -280,6 +282,7 @@ struct LazyLoadingImage: View {
280
282
281
283
let source : URL
282
284
let width : CGFloat
285
+ let height : CGFloat
283
286
var resize : Bool = true
284
287
var imageTapped : ( ( Int ) -> Void ) ? = nil
285
288
var index : Int ?
@@ -294,7 +297,7 @@ struct LazyLoadingImage: View {
294
297
// The click area expands outside the image view (although not visible).
295
298
Rectangle ( )
296
299
. opacity ( 0.000001 )
297
- . frame ( width: width)
300
+ . frame ( width: width, height : height )
298
301
. clipped ( )
299
302
. allowsHitTesting ( true )
300
303
. highPriorityGesture (
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ struct QuotedMessageView: View {
71
71
LazyLoadingImage (
72
72
source: quotedMessage. imageAttachments [ 0 ] . imagePreviewURL,
73
73
width: attachmentWidth,
74
+ height: attachmentWidth,
74
75
resize: false
75
76
)
76
77
} else if !quotedMessage. giphyAttachments. isEmpty {
You can’t perform that action at this time.
0 commit comments