mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
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,
|
notificationsService: NotificationsServiceAbstraction,
|
||||||
platformUtilsService: PlatformUtilsServiceAbstraction,
|
platformUtilsService: PlatformUtilsServiceAbstraction,
|
||||||
stateService: StateServiceAbstraction,
|
stateService: StateServiceAbstraction,
|
||||||
cryptoService: CryptoServiceAbstraction
|
cryptoService: CryptoServiceAbstraction,
|
||||||
|
nativeMessagingService: NativeMessagingService
|
||||||
): Function {
|
): Function {
|
||||||
return async () => {
|
return async () => {
|
||||||
|
nativeMessagingService.init();
|
||||||
await stateService.init();
|
await stateService.init();
|
||||||
await environmentService.setUrlsFromStorage();
|
await environmentService.setUrlsFromStorage();
|
||||||
syncService.fullSync(true);
|
syncService.fullSync(true);
|
||||||
@ -122,6 +124,7 @@ export function initFactory(
|
|||||||
PlatformUtilsServiceAbstraction,
|
PlatformUtilsServiceAbstraction,
|
||||||
StateServiceAbstraction,
|
StateServiceAbstraction,
|
||||||
CryptoServiceAbstraction,
|
CryptoServiceAbstraction,
|
||||||
|
NativeMessagingService,
|
||||||
],
|
],
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,9 @@ export class NativeMessagingService {
|
|||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
private vaultTimeoutService: VaultTimeoutService,
|
private vaultTimeoutService: VaultTimeoutService,
|
||||||
private stateService: StateService
|
private stateService: StateService
|
||||||
) {
|
) {}
|
||||||
|
|
||||||
|
init() {
|
||||||
ipcRenderer.on("nativeMessaging", async (_event: any, message: any) => {
|
ipcRenderer.on("nativeMessaging", async (_event: any, message: any) => {
|
||||||
this.messageHandler(message);
|
this.messageHandler(message);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user