From a0ba1484f5f33abcfdf3a0e37d3c7cbe105711ad Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 27 Feb 2023 17:16:38 +1100 Subject: [PATCH] fix an edge case of showing 'original message not found' incorrectly --- .../Conversations/Message Cells/Content Views/QuoteView.swift | 4 ++-- Session/Conversations/Message Cells/VisibleMessageCell.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Session/Conversations/Message Cells/Content Views/QuoteView.swift b/Session/Conversations/Message Cells/Content Views/QuoteView.swift index fa5f9e931..ebd726a1c 100644 --- a/Session/Conversations/Message Cells/Content Views/QuoteView.swift +++ b/Session/Conversations/Message Cells/Content Views/QuoteView.swift @@ -220,10 +220,10 @@ final class QuoteView: UIView { } .defaulting( to: attachment.map { - NSAttributedString(string: $0.shortDescription) + NSAttributedString(string: $0.shortDescription, attributes: [ .foregroundColor: textColor ]) } ) - .defaulting(to: NSAttributedString(string: "Document")) + .defaulting(to: NSAttributedString(string: "QUOTED_MESSAGE_NOT_FOUND".localized(), attributes: [ .foregroundColor: textColor ])) } // Label stack view diff --git a/Session/Conversations/Message Cells/VisibleMessageCell.swift b/Session/Conversations/Message Cells/VisibleMessageCell.swift index 94eb3d73e..591d3ade6 100644 --- a/Session/Conversations/Message Cells/VisibleMessageCell.swift +++ b/Session/Conversations/Message Cells/VisibleMessageCell.swift @@ -545,7 +545,7 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate { let quoteView: QuoteView = QuoteView( for: .regular, authorId: quote.authorId, - quotedText: quote.body ?? "QUOTED_MESSAGE_NOT_FOUND".localized(), + quotedText: quote.body, threadVariant: cellViewModel.threadVariant, currentUserPublicKey: cellViewModel.currentUserPublicKey, currentUserBlindedPublicKey: cellViewModel.currentUserBlindedPublicKey,