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

[AC-1479][BEEEP] Refactor ConfigService to improve observable usage (#5602)

* refactor ConfigService to use observables

* make environmentService.urls a ReplaySubject

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>
This commit is contained in:
Thomas Rittson
2023-09-09 00:05:37 +10:00
committed by GitHub
parent fe354f9063
commit 61e1bc1a1c
29 changed files with 356 additions and 158 deletions

View File

@@ -13,6 +13,7 @@ import {
} from "@bitwarden/common/platform/abstractions/environment.service";
import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service";
import { StateService as StateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service";
import { ConfigService } from "@bitwarden/common/platform/services/config/config.service";
import { ContainerService } from "@bitwarden/common/platform/services/container.service";
import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service";
import { VaultTimeoutService } from "@bitwarden/common/services/vault-timeout/vault-timeout.service";
@@ -32,7 +33,8 @@ export class InitService {
private stateService: StateServiceAbstraction,
private cryptoService: CryptoServiceAbstraction,
private themingService: AbstractThemingService,
private encryptService: EncryptService
private encryptService: EncryptService,
private configService: ConfigService
) {}
init() {
@@ -57,6 +59,8 @@ export class InitService {
await this.themingService.monitorThemeChanges();
const containerService = new ContainerService(this.cryptoService, this.encryptService);
containerService.attachToGlobal(this.win);
this.configService.init();
};
}
}