diff --git a/apps/desktop/src/autofill/main/main-desktop-autotype.service.ts b/apps/desktop/src/autofill/main/main-desktop-autotype.service.ts index c26e24de6c8..e9350fb606c 100644 --- a/apps/desktop/src/autofill/main/main-desktop-autotype.service.ts +++ b/apps/desktop/src/autofill/main/main-desktop-autotype.service.ts @@ -18,17 +18,17 @@ export class MainDesktopAutotypeService { private windowMain: WindowMain, ) { this.autotypeKeyboardShortcut = new AutotypeKeyboardShortcut(); - } - - init() { - ipcMain.handle(AUTOTYPE_IPC_CHANNELS.INIT, () => { - this.init(); - }); ipcMain.handle(AUTOTYPE_IPC_CHANNELS.INITIALIZED, () => { return this.isInitialized; }); + ipcMain.handle(AUTOTYPE_IPC_CHANNELS.INIT, () => { + this.init(); + }); + } + + init() { ipcMain.on(AUTOTYPE_IPC_CHANNELS.TOGGLE, (_event, enable: boolean) => { if (enable) { this.enableAutotype();