Skip to content

Commit 4ee5db5

Browse files
fixed a bug with image replies in portrait
1 parent e7a02d6 commit 4ee5db5

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

Sources/StreamChatSwiftUI/ChatChannel/MessageList/ImageAttachmentView.swift

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,25 @@ public struct ImageAttachmentContainer: View {
2626
)
2727
}
2828

29-
ImageAttachmentView(
30-
message: message,
31-
width: width
32-
)
33-
34-
if !message.text.isEmpty {
35-
HStack {
36-
Text(message.text)
37-
.standardPadding()
38-
Spacer()
29+
VStack(
30+
alignment: message.alignmentInBubble,
31+
spacing: 0
32+
) {
33+
ImageAttachmentView(
34+
message: message,
35+
width: width
36+
)
37+
38+
if !message.text.isEmpty {
39+
HStack {
40+
Text(message.text)
41+
.standardPadding()
42+
Spacer()
43+
}
44+
.background(Color(backgroundColor))
3945
}
40-
.background(Color(backgroundColor))
4146
}
47+
.clipped()
4248
}
4349
.messageBubble(for: message, isFirst: isFirst)
4450
}

0 commit comments

Comments
 (0)