Greyson Parrelli 003fa1b059 Make long text attachments contain the entire message.
Instead of just containing the 'overflow', long text attachments now
contain the entire body in full.
2019-03-02 19:31:22 -08:00

29 lines
696 B
Java

package org.thoughtcrime.securesms.longmessage;
import android.text.TextUtils;
import org.thoughtcrime.securesms.database.model.MessageRecord;
/**
* A wrapper around a {@link MessageRecord} and its extra text attachment expanded into a string
* held in memory.
*/
class LongMessage {
private final MessageRecord messageRecord;
private final String fullBody;
LongMessage(MessageRecord messageRecord, String fullBody) {
this.messageRecord = messageRecord;
this.fullBody = fullBody;
}
MessageRecord getMessageRecord() {
return messageRecord;
}
String getFullBody() {
return !TextUtils.isEmpty(fullBody) ? fullBody : messageRecord.getBody();
}
}