mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Show the full reply chain in the 'see replies' bottom sheet.
This commit is contained in:
@@ -45,6 +45,7 @@ import java.io.Closeable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -307,9 +308,20 @@ public class MmsSmsDatabase extends Database {
|
||||
MessageRecord record;
|
||||
while ((record = reader.getNext()) != null) {
|
||||
records.add(record);
|
||||
records.addAll(getAllMessagesThatQuote(new MessageId(record.getId(), record.isMms())));
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(records, (lhs, rhs) -> {
|
||||
if (lhs.getDateReceived() > rhs.getDateReceived()) {
|
||||
return -1;
|
||||
} else if (lhs.getDateReceived() < rhs.getDateReceived()) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
return records;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,13 @@ public class MediaMmsMessageRecord extends MmsMessageRecord {
|
||||
getNotifiedTimestamp(), getViewedReceiptCount(), getReceiptTimestamp(), getMessageRanges(), getStoryType(), getParentStoryId(), getGiftBadge());
|
||||
}
|
||||
|
||||
public @NonNull MediaMmsMessageRecord withoutQuote() {
|
||||
return new MediaMmsMessageRecord(getId(), getRecipient(), getIndividualRecipient(), getRecipientDeviceId(), getDateSent(), getDateReceived(), getServerTimestamp(), getDeliveryReceiptCount(), getThreadId(), getBody(), getSlideDeck(),
|
||||
getPartCount(), getType(), getIdentityKeyMismatches(), getNetworkFailures(), getSubscriptionId(), getExpiresIn(), getExpireStarted(), isViewOnce(),
|
||||
getReadReceiptCount(), null, getSharedContacts(), getLinkPreviews(), isUnidentified(), getReactions(), isRemoteDelete(), mentionsSelf,
|
||||
getNotifiedTimestamp(), getViewedReceiptCount(), getReceiptTimestamp(), getMessageRanges(), getStoryType(), getParentStoryId(), getGiftBadge());
|
||||
}
|
||||
|
||||
public @NonNull MediaMmsMessageRecord withAttachments(@NonNull Context context, @NonNull List<DatabaseAttachment> attachments) {
|
||||
Map<AttachmentId, DatabaseAttachment> attachmentIdMap = new HashMap<>();
|
||||
for (DatabaseAttachment attachment : attachments) {
|
||||
|
||||
Reference in New Issue
Block a user