mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Fix quote view size calculation
This commit is contained in:
parent
b854a5d936
commit
9cd99c6c84
@ -82,10 +82,10 @@ class VisibleMessageContentView : LinearLayout {
|
|||||||
} else if (message is MmsMessageRecord && message.quote != null) {
|
} else if (message is MmsMessageRecord && message.quote != null) {
|
||||||
val quote = message.quote!!
|
val quote = message.quote!!
|
||||||
val quoteView = QuoteView(context, QuoteView.Mode.Regular)
|
val quoteView = QuoteView(context, QuoteView.Mode.Regular)
|
||||||
// The max content width is the max message bubble size - 2 times the horizontal padding - the
|
// The max content width is the max message bubble size - 2 times the horizontal padding - 2
|
||||||
// quote view content area's start margin. This unfortunately has to be calculated manually
|
// times the horizontal margin. This unfortunately has to be calculated manually
|
||||||
// here to get the layout right.
|
// 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) {
|
val quoteText = if (quote.isOriginalMissing) {
|
||||||
context.getString(R.string.QuoteView_original_missing)
|
context.getString(R.string.QuoteView_original_missing)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user