1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: Add support for OCR (#8975)

This commit is contained in:
Laurent Cozic
2023-12-13 19:24:58 +00:00
committed by GitHub
parent 0e847685ff
commit bce94f1775
79 changed files with 2381 additions and 445 deletions

View File

@ -287,8 +287,7 @@ describe('Synchronizer.resources', () => {
{
await synchronizerStart();
await resourceFetcher().start();
await resourceFetcher().waitForAllFinished();
await resourceFetcher().startAndWait();
}
await switchClient(1);

View File

@ -52,20 +52,18 @@ export default async (action: ConflictAction, ItemClass: any, remoteExists: bool
await Note.createConflictNote(local, ItemChange.SOURCE_SYNC);
}
} else if (action === 'resourceConflict') {
// ------------------------------------------------------------------------------
// Unlike notes we always handle the conflict for resources
// ------------------------------------------------------------------------------
if (!remoteContent || Resource.mustHandleConflict(local, remoteContent)) {
await Resource.createConflictResourceNote(local);
await Resource.createConflictResourceNote(local);
if (remoteExists) {
// The local content we have is no longer valid and should be re-downloaded
await Resource.setLocalState(local.id, {
fetch_status: Resource.FETCH_STATUS_IDLE,
});
}
if (remoteExists) {
// The local content we have is no longer valid and should be re-downloaded
await Resource.setLocalState(local.id, {
fetch_status: Resource.FETCH_STATUS_IDLE,
});
dispatch({ type: 'SYNC_CREATED_OR_UPDATED_RESOURCE', id: local.id });
}
dispatch({ type: 'SYNC_CREATED_OR_UPDATED_RESOURCE', id: local.id });
}
if (['noteConflict', 'resourceConflict'].includes(action)) {