Fix BackupRestoreMediaJob not correctly paging through attachments.

This commit is contained in:
Cody Henthorne
2025-04-25 12:50:06 -04:00
parent 87cbe305f0
commit 5453f101ff
2 changed files with 2 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ class BackupRestoreMediaJob private constructor(parameters: Parameters) : BaseJo
// Intentionally enqueues one at a time for safer attachment transfer state management
restoreThumbnailJobs.forEach { jobManager.add(it) }
restoreFullAttachmentJobs.forEach { jobManager.add(it) }
} while (restoreThumbnailJobs.isNotEmpty() && restoreFullAttachmentJobs.isNotEmpty() && notRestorable.isNotEmpty())
} while (restoreThumbnailJobs.isNotEmpty() || restoreFullAttachmentJobs.isNotEmpty() || notRestorable.isNotEmpty())
SignalStore.backup.totalRestorableAttachmentSize = SignalDatabase.attachments.getRemainingRestorableAttachmentSize()

View File

@@ -268,7 +268,7 @@ class RestoreAttachmentJob private constructor(
throw IOException("Failed to delete temp download file following range exception")
}
} catch (e: InvalidAttachmentException) {
Log.w(TAG, "Experienced exception while trying to download an attachment.", e)
Log.w(TAG, e.message)
markFailed(attachmentId)
} catch (e: NonSuccessfulResponseCodeException) {
if (SignalStore.backup.backsUpMedia) {