1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

PM-5274 Migrate Collection Service State (#7732)

* update collection service to use new state provider framework, remove stateservice from collection service, update collections state provider with migrate file and unit test
This commit is contained in:
Jason Ng
2024-02-14 17:03:03 -05:00
committed by GitHub
parent d8b74b78da
commit 3edf098aaf
23 changed files with 426 additions and 170 deletions

View File

@@ -87,6 +87,7 @@ import {
} from "@bitwarden/common/tools/password-strength";
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service";
import { SendService } from "@bitwarden/common/tools/send/services/send.service";
import { UserId } from "@bitwarden/common/types/guid";
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
import { CipherService } from "@bitwarden/common/vault/services/cipher.service";
import { CollectionService } from "@bitwarden/common/vault/services/collection.service";
@@ -358,7 +359,7 @@ export class Main {
this.collectionService = new CollectionService(
this.cryptoService,
this.i18nService,
this.stateService,
this.stateProvider,
);
this.providerService = new ProviderService(this.stateService);
@@ -616,7 +617,7 @@ export class Main {
this.settingsService.clear(userId),
this.cipherService.clear(userId),
this.folderService.clear(userId),
this.collectionService.clear(userId),
this.collectionService.clear(userId as UserId),
this.policyService.clear(userId),
this.passwordGenerationService.clear(),
]);