diff --git a/Session/Conversations/Message Cells/Content Views/SwiftUI/QuoteView_SwiftUI.swift b/Session/Conversations/Message Cells/Content Views/SwiftUI/QuoteView_SwiftUI.swift index 531a99322..31ea42a54 100644 --- a/Session/Conversations/Message Cells/Content Views/SwiftUI/QuoteView_SwiftUI.swift +++ b/Session/Conversations/Message Cells/Content Views/SwiftUI/QuoteView_SwiftUI.swift @@ -149,6 +149,7 @@ struct QuoteView_SwiftUI: View { Text(author) .bold() .font(.system(size: Values.smallFontSize)) + .lineLimit(1) .foregroundColor(themeColor: targetThemeColor) } @@ -170,6 +171,7 @@ struct QuoteView_SwiftUI: View { ] ) ) + .lineLimit(2) } else { Text("QUOTED_MESSAGE_NOT_FOUND".localized()) .font(.system(size: Values.smallFontSize)) diff --git a/Session/Media Viewing & Editing/MessageInfoView.swift b/Session/Media Viewing & Editing/MessageInfoView.swift index f0811a006..855bbf4f4 100644 --- a/Session/Media Viewing & Editing/MessageInfoView.swift +++ b/Session/Media Viewing & Editing/MessageInfoView.swift @@ -413,34 +413,27 @@ struct MessageBubble: View { isOutgoing: (messageViewModel.variant == .standardOutgoing)) } } - // else { - // // Stack view - // let stackView = UIStackView(arrangedSubviews: []) - // stackView.axis = .vertical - // stackView.spacing = 2 - // - // // Quote view - // if let quote: Quote = messageViewModel.quote { - // let hInset: CGFloat = 2 - // let quoteView: QuoteView = QuoteView( - // for: .regular, - // authorId: quote.authorId, - // quotedText: quote.body, - // threadVariant: cellViewModel.threadVariant, - // currentUserPublicKey: cellViewModel.currentUserPublicKey, - // currentUserBlinded15PublicKey: cellViewModel.currentUserBlinded15PublicKey, - // currentUserBlinded25PublicKey: cellViewModel.currentUserBlinded25PublicKey, - // direction: (cellViewModel.variant == .standardOutgoing ? - // .outgoing : - // .incoming - // ), - // attachment: cellViewModel.quoteAttachment, - // hInset: hInset, - // maxWidth: maxWidth - // ) - // let quoteViewContainer = UIView(wrapping: quoteView, withInsets: UIEdgeInsets(top: 0, leading: hInset, bottom: 0, trailing: hInset)) - // stackView.addArrangedSubview(quoteViewContainer) - // } + else { + if let quote = messageViewModel.quote { + QuoteView_SwiftUI( + info: .init( + mode: .regular, + authorId: quote.authorId, + quotedText: quote.body, + threadVariant: messageViewModel.threadVariant, + currentUserPublicKey: messageViewModel.currentUserPublicKey, + currentUserBlinded15PublicKey: messageViewModel.currentUserBlinded15PublicKey, + currentUserBlinded25PublicKey: messageViewModel.currentUserBlinded25PublicKey, + direction: (messageViewModel.variant == .standardOutgoing ? .outgoing : .incoming), + attachment: messageViewModel.quoteAttachment + ) + ) + .padding(.top, Self.inset) + .padding(.horizontal, Self.inset) + .padding(.bottom, -Values.smallSpacing) + } + } + if let bodyText: NSAttributedString = VisibleMessageCell.getBodyAttributedText( for: messageViewModel, theme: ThemeManager.currentTheme,