Fix bug with not showing entire long message when it contains no mentions.

This commit is contained in:
Cody Henthorne
2021-08-10 12:02:35 -04:00
parent cfab195e90
commit 3baf10f0e9

View File

@@ -74,10 +74,7 @@ public class ConversationMessage {
}
public @NonNull SpannableString getDisplayBody(Context context) {
if (mentions.isEmpty() || body == null) {
return messageRecord.getDisplayBody(context);
}
return body;
return (body != null) ? body : messageRecord.getDisplayBody(context);
}
/**
@@ -107,7 +104,7 @@ public class ConversationMessage {
if (messageRecord.isMms() && mentions != null && !mentions.isEmpty()) {
return new ConversationMessage(messageRecord, body, mentions);
}
return createWithResolvedData(messageRecord);
return new ConversationMessage(messageRecord, body, null);
}
/**
@@ -149,7 +146,7 @@ public class ConversationMessage {
return new ConversationMessage(messageRecord, updated.getBody(), updated.getMentions());
}
}
return createWithResolvedData(messageRecord);
return createWithResolvedData(messageRecord, body, null);
}
}
}