Add backup attachment restore idle state

This commit is contained in:
trevor-signal
2024-10-24 16:21:02 -04:00
committed by GitHub
parent 56ccd02232
commit 8601baa7f5
13 changed files with 122 additions and 17 deletions

View File

@@ -109,6 +109,7 @@ import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc';
import { loadAllAndReinitializeRedux } from '../allLoaders';
import { resetBackupMediaDownloadProgress } from '../../util/backupMediaDownload';
import { getEnvironment, isTestEnvironment } from '../../environment';
import { drop } from '../../util/drop';
const MAX_CONCURRENCY = 10;
@@ -339,6 +340,11 @@ export class BackupImportStream extends Writable {
!isTestEnvironment(getEnvironment())
) {
await AttachmentDownloadManager.start();
drop(
AttachmentDownloadManager.waitForIdle(async () => {
await window.storage.put('backupMediaDownloadIdle', true);
})
);
}
done();