|
|
|
@ -391,14 +391,13 @@ struct MessageBubble: View {
|
|
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
|
ZStack {
|
|
|
|
|
switch messageViewModel.cellType {
|
|
|
|
|
case .textOnlyMessage:
|
|
|
|
|
let maxWidth: CGFloat = (VisibleMessageCell.getMaxWidth(for: messageViewModel) - 2 * Self.inset)
|
|
|
|
|
|
|
|
|
|
VStack(
|
|
|
|
|
alignment: .leading,
|
|
|
|
|
spacing: 0
|
|
|
|
|
) {
|
|
|
|
|
// FIXME: We should support rendering link previews alongside quotes (bigger refactor)
|
|
|
|
|
if let linkPreview: LinkPreview = messageViewModel.linkPreview {
|
|
|
|
|
switch linkPreview.variant {
|
|
|
|
|
case .standard:
|
|
|
|
@ -457,7 +456,8 @@ struct MessageBubble: View {
|
|
|
|
|
AttributedText(bodyText)
|
|
|
|
|
.padding(.all, Self.inset)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch messageViewModel.cellType {
|
|
|
|
|
case .mediaMessage:
|
|
|
|
|
if let bodyText: NSAttributedString = VisibleMessageCell.getBodyAttributedText(
|
|
|
|
|
for: messageViewModel,
|
|
|
|
@ -518,6 +518,7 @@ struct MessageBubble: View {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct InfoBlock<Content>: View where Content: View {
|
|
|
|
|