mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Update to the latest backup tests.
This commit is contained in:
@@ -1519,14 +1519,10 @@ class AttachmentTable(
|
||||
|
||||
val insertedAttachments: MutableMap<Attachment, AttachmentId> = mutableMapOf()
|
||||
for (attachment in attachments) {
|
||||
val attachmentId = if (attachment.uri != null) {
|
||||
insertAttachmentWithData(mmsId, attachment, attachment.quote)
|
||||
} else {
|
||||
if (attachment is ArchivedAttachment) {
|
||||
insertArchivedAttachment(mmsId, attachment, attachment.quote)
|
||||
} else {
|
||||
insertUndownloadedAttachment(mmsId, attachment, attachment.quote)
|
||||
}
|
||||
val attachmentId = when {
|
||||
attachment.uri != null -> insertAttachmentWithData(mmsId, attachment, attachment.quote)
|
||||
attachment is ArchivedAttachment -> insertArchivedAttachment(mmsId, attachment, attachment.quote)
|
||||
else -> insertUndownloadedAttachment(mmsId, attachment, attachment.quote)
|
||||
}
|
||||
|
||||
insertedAttachments[attachment] = attachmentId
|
||||
@@ -1535,10 +1531,10 @@ class AttachmentTable(
|
||||
|
||||
try {
|
||||
for (attachment in quoteAttachment) {
|
||||
val attachmentId = if (attachment.uri != null) {
|
||||
insertAttachmentWithData(mmsId, attachment, true)
|
||||
} else {
|
||||
insertUndownloadedAttachment(mmsId, attachment, true)
|
||||
val attachmentId = when {
|
||||
attachment.uri != null -> insertAttachmentWithData(mmsId, attachment, true)
|
||||
attachment is ArchivedAttachment -> insertArchivedAttachment(mmsId, attachment, true)
|
||||
else -> insertUndownloadedAttachment(mmsId, attachment, true)
|
||||
}
|
||||
|
||||
insertedAttachments[attachment] = attachmentId
|
||||
|
||||
Reference in New Issue
Block a user