1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +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

@@ -9,6 +9,7 @@ import { ProfileConfig } from './services/profileConfig/types';
import * as ArrayUtils from './ArrayUtils';
import { FolderEntity } from './services/database/types';
import { getListRendererIds } from './services/noteList/renderers';
import { ProcessResultsRow } from './services/searchengine/SearchEngine';
const fastDeepEqual = require('fast-deep-equal');
const { ALL_NOTES_FILTER_ID } = require('./reserved-ids');
const { createSelectorCreator, defaultMemoize } = require('reselect');
@@ -77,6 +78,7 @@ export interface State {
syncStarted: boolean;
syncReport: any;
searchQuery: string;
searchResults: ProcessResultsRow[];
settings: Record<string, any>;
sharedData: any;
appState: string;
@@ -134,6 +136,7 @@ export const defaultState: State = {
syncStarted: false,
syncReport: {},
searchQuery: '',
searchResults: [],
settings: {},
sharedData: null,
appState: 'starting',
@@ -703,6 +706,11 @@ function handleHistory(draft: Draft<State>, action: any) {
draft.backwardHistoryNotes = draft.backwardHistoryNotes.concat(currentNote).slice(-MAX_HISTORY);
}
break;
case 'SEARCH_RESULTS_SET':
draft.searchResults = action.value;
break;
case 'FOLDER_DELETE':
draft.backwardHistoryNotes = draft.backwardHistoryNotes.filter(note => note.parent_id !== action.id);
draft.forwardHistoryNotes = draft.forwardHistoryNotes.filter(note => note.parent_id !== action.id);