Change order of syncs during linking

This commit is contained in:
Fedor Indutny 2022-03-02 14:53:47 -08:00 committed by GitHub
parent 4f869e7900
commit 3b4106d9dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 142 additions and 90 deletions

View file

@ -1312,7 +1312,6 @@ async function sync(
);
}
window.Signal.Util.postLinkExperience.stop();
log.info('storageService.sync: complete');
return manifest;
}
@ -1453,6 +1452,9 @@ export const runStorageServiceSyncJob = debounce(() => {
ourProfileKeyService.blockGetWithPromise(
storageJobQueue(async () => {
await sync();
// Notify listeners about sync completion
window.Whisper.events.trigger('storageService:syncComplete');
}, `sync v${window.storage.get('manifestVersion')}`)
);
}, 500);