Constrain ConversationItem's width to AudioView.

When text was also shown, the text's width was used when it was wider
than the AudioView.
This commit is contained in:
Rashad Sookram
2022-01-03 10:14:02 -05:00
committed by Alex Hart
parent e41c73f293
commit d1eab086f1

View File

@@ -468,6 +468,12 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
activeFooter.getLayoutParams().width = availableWidth;
needsMeasure = true;
}
int desiredWidth = audioViewStub.get().getMeasuredWidth() + ViewUtil.getLeftMargin(audioViewStub.get()) + ViewUtil.getRightMargin(audioViewStub.get());
if (bodyBubble.getMeasuredWidth() != desiredWidth) {
bodyBubble.getLayoutParams().width = desiredWidth;
needsMeasure = true;
}
}
if (needsMeasure) {