Add explicit init to native messaging service (#1262)
This commit is contained in:
parent
ca41cdf8b5
commit
7d46e5c145
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue