1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-20 02:03:21 +00:00

Move storage listener to DC (#258)

This commit is contained in:
Oscar Hinton
2022-04-05 19:30:37 +02:00
committed by GitHub
parent 8981b97632
commit c5cc8eab0a
9 changed files with 2830 additions and 2720 deletions

View File

@@ -4,7 +4,6 @@ import { app } from "electron";
import { StateFactory } from "jslib-common/factories/stateFactory";
import { GlobalState } from "jslib-common/models/domain/globalState";
import { KeytarStorageListener } from "jslib-electron/keytarStorageListener";
import { ElectronLogService } from "jslib-electron/services/electronLog.service";
import { ElectronMainMessagingService } from "jslib-electron/services/electronMainMessaging.service";
import { ElectronStorageService } from "jslib-electron/services/electronStorage.service";
@@ -12,6 +11,7 @@ import { TrayMain } from "jslib-electron/tray.main";
import { UpdaterMain } from "jslib-electron/updater.main";
import { WindowMain } from "jslib-electron/window.main";
import { DCCredentialStorageListener } from "./main/credential-storage-listener";
import { MenuMain } from "./main/menu.main";
import { MessagingMain } from "./main/messaging.main";
import { Account } from "./models/account";
@@ -23,7 +23,7 @@ export class Main {
i18nService: I18nService;
storageService: ElectronStorageService;
messagingService: ElectronMainMessagingService;
keytarStorageListener: KeytarStorageListener;
credentialStorageListener: DCCredentialStorageListener;
stateService: StateService;
windowMain: WindowMain;
@@ -105,11 +105,13 @@ export class Main {
this.messagingMain.onMessage(message);
});
this.keytarStorageListener = new KeytarStorageListener("Bitwarden Directory Connector", null);
this.credentialStorageListener = new DCCredentialStorageListener(
"Bitwarden Directory Connector"
);
}
bootstrap() {
this.keytarStorageListener.init();
this.credentialStorageListener.init();
this.windowMain.init().then(
async () => {
await this.i18nService.init(app.getLocale());