Fix read more text for certain text lengths.

Fixes #14017
This commit is contained in:
Greyson Parrelli
2025-02-25 11:00:24 -05:00
parent b746580cac
commit c0788777d8

View File

@@ -1061,7 +1061,8 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
if (hasExtraText(messageRecord)) {
bodyText.setOverflowText(getLongMessageSpan(messageRecord));
int trimmedLength = TextUtils.getTrimmedLength(styledText);
bodyText.setMaxLength(trimmedLength - 2);
int maxLength = Math.min(MessageRecordUtil.MAX_BODY_DISPLAY_LENGTH, trimmedLength - 2);
bodyText.setMaxLength(maxLength);
}
if (messageRecord.isOutgoing()) {