1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-06 23:56:13 +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

@ -1,4 +1,4 @@
import eventManager from '../eventManager';
import eventManager, { EventName } from '../eventManager';
import shim from '../shim';
import { _ } from '../locale';
import keysRegExp from './KeymapService_keysRegExp';
@ -199,7 +199,7 @@ export default class KeymapService extends BaseService {
this.lastSaveTime_ = Date.now();
// Refresh the menu items so that the changes are reflected
eventManager.emit('keymapChange');
eventManager.emit(EventName.KeymapChange);
} catch (error) {
const message = error.message || '';
throw new Error(_('Error: %s', message));
@ -411,12 +411,12 @@ export default class KeymapService extends BaseService {
}
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public on(eventName: string, callback: Function) {
public on(eventName: EventName, callback: Function) {
eventManager.on(eventName, callback);
}
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public off(eventName: string, callback: Function) {
public off(eventName: EventName, callback: Function) {
eventManager.off(eventName, callback);
}