mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +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:
@@ -1,4 +1,4 @@
|
||||
import { concatMap, Observable, Subject } from "rxjs";
|
||||
import { concatMap, Observable, ReplaySubject } from "rxjs";
|
||||
|
||||
import { EnvironmentUrls } from "../../auth/models/domain/environment-urls";
|
||||
import {
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { StateService } from "../abstractions/state.service";
|
||||
|
||||
export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
private readonly urlsSubject = new Subject<void>();
|
||||
private readonly urlsSubject = new ReplaySubject<void>(1);
|
||||
urls: Observable<void> = this.urlsSubject.asObservable();
|
||||
selectedRegion?: Region;
|
||||
initialized = false;
|
||||
|
||||
Reference in New Issue
Block a user