From 9cd99c6c84e850ef097ae6632eb55d047e8c0fab Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 7 Jul 2021 10:55:07 +1000 Subject: [PATCH] Fix quote view size calculation --- .../conversation/v2/messages/VisibleMessageContentView.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt index e2587c9dac..dd111d0a72 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt @@ -82,10 +82,10 @@ class VisibleMessageContentView : LinearLayout { } else if (message is MmsMessageRecord && message.quote != null) { val quote = message.quote!! val quoteView = QuoteView(context, QuoteView.Mode.Regular) - // The max content width is the max message bubble size - 2 times the horizontal padding - the - // quote view content area's start margin. This unfortunately has to be calculated manually + // The max content width is the max message bubble size - 2 times the horizontal padding - 2 + // times the horizontal margin. This unfortunately has to be calculated manually // here to get the layout right. - val maxContentWidth = (maxWidth - 2 * resources.getDimension(R.dimen.medium_spacing) - toPx(16, resources)).roundToInt() + val maxContentWidth = (maxWidth - 2 * resources.getDimension(R.dimen.medium_spacing) - 2 * toPx(16, resources)).roundToInt() val quoteText = if (quote.isOriginalMissing) { context.getString(R.string.QuoteView_original_missing) } else {