1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +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

@@ -454,7 +454,7 @@ export default class MainBackground {
this.collectionService = new CollectionService(
this.cryptoService,
this.i18nService,
this.stateService,
this.stateProvider,
);
this.syncNotifierService = new SyncNotifierService();
this.organizationService = new BrowserOrganizationService(

View File

@@ -14,10 +14,8 @@ import {
i18nServiceFactory,
I18nServiceInitOptions,
} from "../../../platform/background/service-factories/i18n-service.factory";
import {
stateServiceFactory as stateServiceFactory,
StateServiceInitOptions,
} from "../../../platform/background/service-factories/state-service.factory";
import { stateProviderFactory } from "../../../platform/background/service-factories/state-provider.factory";
import { StateServiceInitOptions } from "../../../platform/background/service-factories/state-service.factory";
type CollectionServiceFactoryOptions = FactoryOptions;
@@ -38,7 +36,7 @@ export function collectionServiceFactory(
new CollectionService(
await cryptoServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
await stateServiceFactory(cache, opts),
await stateProviderFactory(cache, opts),
),
);
}