1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

[PM-5434] Create VaultBrowserStateService and migrate components from BrowserStateService (#8017)

* PM-5434 Initial work on migration

* PM-5434 Migration and tests

* PM-5434 Remove unnecessary comments

* PM-5434 Add unit tests

* PM-5434 Reverted last changes

* PM-5434 Added unit test for deserialize

* PM-5434 Minor changes

* PM-5434 Fix pr comments
This commit is contained in:
Carlos Gonçalves
2024-04-02 16:23:05 +01:00
committed by GitHub
parent a201e9cff1
commit af5f45443d
10 changed files with 173 additions and 90 deletions

View File

@@ -102,6 +102,7 @@ import { ForegroundPlatformUtilsService } from "../../platform/services/platform
import { ForegroundDerivedStateProvider } from "../../platform/state/foreground-derived-state.provider";
import { ForegroundMemoryStorageService } from "../../platform/storage/foreground-memory-storage.service";
import { FilePopoutUtilsService } from "../../tools/popup/services/file-popout-utils.service";
import { VaultBrowserStateService } from "../../vault/services/vault-browser-state.service";
import { VaultFilterService } from "../../vault/services/vault-filter.service";
import { DebounceNavigationService } from "./debounce-navigation.service";
@@ -377,6 +378,13 @@ const safeProviders: SafeProvider[] = [
provide: OBSERVABLE_DISK_STORAGE,
useExisting: AbstractStorageService,
}),
safeProvider({
provide: VaultBrowserStateService,
useFactory: (stateProvider: StateProvider) => {
return new VaultBrowserStateService(stateProvider);
},
deps: [StateProvider],
}),
safeProvider({
provide: StateServiceAbstraction,
useFactory: (