Fix poor spacing of footer in short group text messages.

This commit is contained in:
Alex Hart
2023-09-05 11:27:23 -03:00
committed by Nicholas Tinsley
parent 131212b158
commit 898404fc65

View File

@@ -13,7 +13,6 @@ import org.thoughtcrime.securesms.util.ViewUtil
import org.thoughtcrime.securesms.util.padding
import org.thoughtcrime.securesms.util.views.Stub
import org.thoughtcrime.securesms.util.visible
import kotlin.math.max
/**
* Logical delegate for determining the footer position for a particular conversation item.
@@ -109,12 +108,10 @@ class V2FooterPositionDelegate private constructor(
return
}
val targetWidth = body.measuredWidth + 24.dp + getFooterWidth()
val end = max(0, targetWidth - bodyContainer.measuredWidth) - 8.dp
val (left, right) = if (bodyContainer.layoutDirection == View.LAYOUT_DIRECTION_LTR) {
0 to end
0 to (getFooterWidth() - 8.dp)
} else {
end to 0
(getFooterWidth() - 8.dp) to 0
}
body.padding(right = right, left = left, bottom = 0)