1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-25 09:32:06 +01:00

Use useClass instead of useFactory (#6076)

This commit is contained in:
Oscar Hinton 2023-08-22 14:47:52 +02:00 committed by GitHub
parent 607e697764
commit 019d4c2932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,35 +452,7 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction";
},
{
provide: VaultTimeoutService,
useFactory: (
cipherService: CipherServiceAbstraction,
folderService: FolderServiceAbstraction,
collectionService: CollectionServiceAbstraction,
cryptoService: CryptoServiceAbstraction,
platformUtilsService: PlatformUtilsServiceAbstraction,
messagingService: MessagingServiceAbstraction,
searchService: SearchServiceAbstraction,
stateService: StateServiceAbstraction,
authService: AuthServiceAbstraction,
vaultTimeoutSettingsService: VaultTimeoutSettingsServiceAbstraction,
lockedCallback: (userId?: string) => Promise<void>,
logoutCallback: (expired: boolean, userId?: string) => Promise<void>
) => {
return new VaultTimeoutService(
cipherService,
folderService,
collectionService,
cryptoService,
platformUtilsService,
messagingService,
searchService,
stateService,
authService,
vaultTimeoutSettingsService,
lockedCallback,
logoutCallback
);
},
useClass: VaultTimeoutService,
deps: [
CipherServiceAbstraction,
FolderServiceAbstraction,