refactor(electron): reduce the number of listeners for ipc (#7740)

previously there are quite a lot of api/events handlers registered on ipcMain/ipcRenderer. After this PR, the number should be significantly reduced, which will benefit performance.
This commit is contained in:
pengx17
2024-08-05 13:33:31 +00:00
parent 0acc1bd9e8
commit 0d7de67e01
5 changed files with 104 additions and 58 deletions
@@ -27,3 +27,6 @@ export type MainToHelper = Pick<
| 'showItemInFolder'
| 'getPath'
>;
export const AFFINE_API_CHANNEL_NAME = 'affine-ipc-api';
export const AFFINE_EVENT_CHANNEL_NAME = 'affine-ipc-event';