Skip to content

Commit

Permalink
fix: only load vault timeout service in background (#11344)
Browse files Browse the repository at this point in the history
  • Loading branch information
coroiu authored Oct 3, 2024
1 parent d3d1a55 commit 29db451
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions apps/browser/src/background/main.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export default class MainBackground {
folderService: InternalFolderServiceAbstraction;
userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction;
collectionService: CollectionServiceAbstraction;
vaultTimeoutService: VaultTimeoutService;
vaultTimeoutService?: VaultTimeoutService;
vaultTimeoutSettingsService: VaultTimeoutSettingsServiceAbstraction;
passwordGenerationService: PasswordGenerationServiceAbstraction;
syncService: SyncService;
Expand Down Expand Up @@ -842,24 +842,26 @@ export default class MainBackground {

this.vaultSettingsService = new VaultSettingsService(this.stateProvider);

this.vaultTimeoutService = new VaultTimeoutService(
this.accountService,
this.masterPasswordService,
this.cipherService,
this.folderService,
this.collectionService,
this.platformUtilsService,
this.messagingService,
this.searchService,
this.stateService,
this.authService,
this.vaultTimeoutSettingsService,
this.stateEventRunnerService,
this.taskSchedulerService,
this.logService,
lockedCallback,
logoutCallback,
);
if (!this.popupOnlyContext) {
this.vaultTimeoutService = new VaultTimeoutService(
this.accountService,
this.masterPasswordService,
this.cipherService,
this.folderService,
this.collectionService,
this.platformUtilsService,
this.messagingService,
this.searchService,
this.stateService,
this.authService,
this.vaultTimeoutSettingsService,
this.stateEventRunnerService,
this.taskSchedulerService,
this.logService,
lockedCallback,
logoutCallback,
);
}
this.containerService = new ContainerService(this.cryptoService, this.encryptService);

this.sendStateProvider = new SendStateProvider(this.stateProvider);
Expand Down

0 comments on commit 29db451

Please sign in to comment.