mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
003fa1b059
Instead of just containing the 'overflow', long text attachments now contain the entire body in full.
29 lines
696 B
Java
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();
|
|
}
|
|
}
|