Fix too wide message bubbles when hiding information

Change-Id: I8507bf146a415237bef95683eb7a2f031bee9b7e
This commit is contained in:
SpiritCroc 2020-12-07 18:55:19 +01:00
parent 455d48ea6a
commit 8d55c5ef9a

View File

@ -251,7 +251,7 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>
val time = attributes.informationData.time.toString()
return if (contentInBubble) {
if (BubbleThemeUtils.getBubbleTimeLocation(holder.bubbleTimeView.context) == BubbleThemeUtils.BUBBLE_TIME_BOTTOM) {
if (attributes.informationData.showInformation) {
if (attributes.informationData.showInformation && !canHideAvatars()) {
// Since timeView automatically gets enough space, either within or outside the viewStub, we just need to ensure the member name view has enough space
// Somehow not enough without extra space...
ceil(BubbleThemeUtils.guessTextWidth(holder.bubbleMemberNameView, "$memberName ")).toInt()