1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

All: Fixes #2257: Prevent decryption loop when a resource cannot be decrypted

This commit is contained in:
Laurent Cozic
2020-04-08 01:00:01 +01:00
parent 518af9dc0a
commit 10feeeeb6b
5 changed files with 29 additions and 7 deletions

View File

@ -28,7 +28,6 @@ class Synchronizer {
this.logger_ = new Logger();
this.appType_ = appType;
this.cancelling_ = false;
this.autoStartDecryptionWorker_ = true;
this.maxResourceSize_ = null;
this.downloadQueue_ = null;
this.clientId_ = Setting.value('clientId');
@ -266,6 +265,10 @@ class Synchronizer {
}
}
isFullSync(steps) {
return steps.includes('update_remote') && steps.includes('delete_remote') && steps.includes('delta');
}
// Synchronisation is done in three major steps:
//
// 1. UPLOAD: Send to the sync target the items that have changed since the last sync.
@ -842,7 +845,7 @@ class Synchronizer {
this.onProgress_ = function() {};
this.progressReport_ = {};
this.dispatch({ type: 'SYNC_COMPLETED' });
this.dispatch({ type: 'SYNC_COMPLETED', isFullSync: this.isFullSync(syncSteps) });
this.state_ = 'idle';