diff --git a/src/app/services.module.ts b/src/app/services.module.ts index e08e555e5f..75e37e4fcd 100644 --- a/src/app/services.module.ts +++ b/src/app/services.module.ts @@ -60,9 +60,11 @@ export function initFactory( notificationsService: NotificationsServiceAbstraction, platformUtilsService: PlatformUtilsServiceAbstraction, stateService: StateServiceAbstraction, - cryptoService: CryptoServiceAbstraction + cryptoService: CryptoServiceAbstraction, + nativeMessagingService: NativeMessagingService ): Function { return async () => { + nativeMessagingService.init(); await stateService.init(); await environmentService.setUrlsFromStorage(); syncService.fullSync(true); @@ -122,6 +124,7 @@ export function initFactory( PlatformUtilsServiceAbstraction, StateServiceAbstraction, CryptoServiceAbstraction, + NativeMessagingService, ], multi: true, }, diff --git a/src/services/nativeMessaging.service.ts b/src/services/nativeMessaging.service.ts index 8c3b897315..c9bfc7901a 100644 --- a/src/services/nativeMessaging.service.ts +++ b/src/services/nativeMessaging.service.ts @@ -33,7 +33,9 @@ export class NativeMessagingService { private messagingService: MessagingService, private vaultTimeoutService: VaultTimeoutService, private stateService: StateService - ) { + ) {} + + init() { ipcRenderer.on("nativeMessaging", async (_event: any, message: any) => { this.messageHandler(message); });