1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Desktop: Resolves #11687: Plugins: Allow editor plugins to support multiple windows (#12041)

This commit is contained in:
Henry Heino
2025-06-06 02:00:47 -07:00
committed by GitHub
parent 291ba88224
commit 608dbab453
46 changed files with 1022 additions and 195 deletions

View File

@@ -5,7 +5,7 @@ import Note from '../../models/Note';
import { reg } from '../../registry';
import ResourceFetcher from '../../services/ResourceFetcher';
import DecryptionWorker from '../../services/DecryptionWorker';
import eventManager from '../../eventManager';
import eventManager, { EventName } from '../../eventManager';
import BaseItem from '../../models/BaseItem';
import shim from '../../shim';
import { Dispatch } from 'redux';
@@ -142,4 +142,14 @@ export default async (store: any, _next: any, action: any, dispatch: Dispatch) =
}
}
}
if (action.type === 'WINDOW_OPEN') {
eventManager.emit(EventName.WindowOpen, {
windowId: action.windowId,
});
} else if (action.type === 'WINDOW_CLOSE') {
eventManager.emit(EventName.WindowClose, {
windowId: action.windowId,
});
}
};