mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 09:22:23 +00:00
Added ability to receive long messages.
Send support is in here too. We'll enable it in a future release after enough people have updated.
This commit is contained in:
@@ -51,7 +51,10 @@ public class MediaDatabase extends Database {
|
||||
+ "ORDER BY " + AttachmentDatabase.TABLE_NAME + "." + AttachmentDatabase.ROW_ID + " DESC";
|
||||
|
||||
private static final String GALLERY_MEDIA_QUERY = String.format(BASE_MEDIA_QUERY, AttachmentDatabase.CONTENT_TYPE + " LIKE 'image/%' OR " + AttachmentDatabase.CONTENT_TYPE + " LIKE 'video/%'");
|
||||
private static final String DOCUMENT_MEDIA_QUERY = String.format(BASE_MEDIA_QUERY, AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'image/%' AND " + AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'video/%' AND " + AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'audio/%'");
|
||||
private static final String DOCUMENT_MEDIA_QUERY = String.format(BASE_MEDIA_QUERY, AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'image/%' AND " +
|
||||
AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'video/%' AND " +
|
||||
AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'audio/%' AND " +
|
||||
AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'text/x-signal-plain'");
|
||||
|
||||
MediaDatabase(Context context, SQLCipherOpenHelper databaseHelper) {
|
||||
super(context, databaseHelper);
|
||||
|
||||
@@ -43,8 +43,6 @@ import java.util.List;
|
||||
*/
|
||||
public abstract class MessageRecord extends DisplayRecord {
|
||||
|
||||
private static final int MAX_DISPLAY_LENGTH = 2000;
|
||||
|
||||
private final Recipient individualRecipient;
|
||||
private final int recipientDeviceId;
|
||||
private final long id;
|
||||
@@ -123,8 +121,6 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
} else if (isIdentityDefault()) {
|
||||
if (isOutgoing()) return new SpannableString(context.getString(R.string.MessageRecord_you_marked_your_safety_number_with_s_unverified, getIndividualRecipient().toShortString()));
|
||||
else return new SpannableString(context.getString(R.string.MessageRecord_you_marked_your_safety_number_with_s_unverified_from_another_device, getIndividualRecipient().toShortString()));
|
||||
} else if (getBody().length() > MAX_DISPLAY_LENGTH) {
|
||||
return new SpannableString(getBody().substring(0, MAX_DISPLAY_LENGTH));
|
||||
}
|
||||
|
||||
return new SpannableString(getBody());
|
||||
|
||||
Reference in New Issue
Block a user