Fix issues with archive uploads matching digest.

This commit is contained in:
Greyson Parrelli
2024-09-18 14:11:36 -04:00
parent 48bd57c56a
commit 1ac19e84c2
13 changed files with 192 additions and 68 deletions

View File

@@ -244,7 +244,7 @@ class InternalBackupPlaygroundViewModel : ViewModel() {
.filter { attachments.contains(it.dbAttachment.attachmentId) }
.map { it.dbAttachment }
BackupRepository.archiveMedia(toArchive)
BackupRepository.copyAttachmentToArchive(toArchive)
}
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.single())
@@ -268,7 +268,7 @@ class InternalBackupPlaygroundViewModel : ViewModel() {
}
fun archiveAttachmentMedia(attachment: BackupAttachment) {
disposables += Single.fromCallable { BackupRepository.archiveMedia(attachment.dbAttachment) }
disposables += Single.fromCallable { BackupRepository.copyAttachmentToArchive(attachment.dbAttachment) }
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.single())
.doOnSubscribe { _mediaState.set { update(inProgress = inProgressMediaIds + attachment.dbAttachment.attachmentId) } }