Skip to content

Commit

Permalink
Fix bug with ellipsizing on media messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Dec 19, 2024
1 parent 08de111 commit 82feee5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,9 @@ private void setBodyText(@NonNull MessageRecord messageRecord,
bodyText.setTextSize(TypedValue.COMPLEX_UNIT_SP, SignalStore.settings().getMessageFontSize());
bodyText.setMovementMethod(LongClickMovementMethod.getInstance(getContext()));

bodyText.setOverflowText(null);
bodyText.setMaxLength(-1);

if (messageRecord.isRemoteDelete()) {
String deletedMessage = context.getString(messageRecord.isOutgoing() ? R.string.ConversationItem_you_deleted_this_message : R.string.ConversationItem_this_message_was_deleted);
SpannableString italics = new SpannableString(deletedMessage);
Expand All @@ -1053,9 +1056,6 @@ private void setBodyText(@NonNull MessageRecord messageRecord,
if (hasExtraText(messageRecord)) {
bodyText.setOverflowText(getLongMessageSpan(messageRecord));
bodyText.setMaxLength(messageRecord.getBody().length() - 2);
} else {
bodyText.setOverflowText(null);
bodyText.setMaxLength(messageRecord.getBody().length());
}

if (messageRecord.isOutgoing()) {
Expand Down

0 comments on commit 82feee5

Please sign in to comment.