PM-7392 - Main.ts - fix circ dep issue.

This commit is contained in:
Jared Snider 2024-05-03 11:17:35 -04:00
parent 1db1728bd2
commit dbbf100187
No known key found for this signature in database
GPG Key ID: A149DDD612516286
1 changed files with 7 additions and 4 deletions

View File

@ -183,9 +183,7 @@ export class Main {
new ElectronMainMessagingService(this.windowMain),
);
messageSubject.asObservable().subscribe((message) => {
this.messagingMain.onMessage(message);
});
// TODO: figure out circular dependency issue here with state service
this.tokenService = new TokenService(
singleUserStateProvider,
@ -222,6 +220,12 @@ export class Main {
this.desktopSettingsService = new DesktopSettingsService(stateProvider);
this.messagingMain = new MessagingMain(this, this.stateService, this.desktopSettingsService);
messageSubject.asObservable().subscribe((message) => {
this.messagingMain.onMessage(message);
});
const biometricStateService = new DefaultBiometricStateService(stateProvider);
this.windowMain = new WindowMain(
@ -233,7 +237,6 @@ export class Main {
(arg) => this.processDeepLink(arg),
(win) => this.trayMain.setupWindowListeners(win),
);
this.messagingMain = new MessagingMain(this, this.stateService, this.desktopSettingsService);
this.updaterMain = new UpdaterMain(this.i18nService, this.windowMain);
this.trayMain = new TrayMain(this.windowMain, this.i18nService, this.desktopSettingsService);