1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

[EC-381] Transition settings service into providing observables (#3253)

* [EC-381] Deleted unused method clearCache from Settings Service

* [EC-381] Marked settings methods as obsolete on State service

* [EC-381] Using observables on settings service

* [EC-381] Added unit tests for Settings service

* [EC-381] Checking userId on clear

* [EC-381] Updated references to StateService activeAccountUnlocked$

* [EC-381] Updated getEquivalentDomains to return observable

* [EC-381] Updated settings service to user concatMap on activeAccountUnlocked$

* [EC-381] Renamed getEquivalentDomains to equivalentDomains

* [EC-381] Completing Behaviors on settings.service tests

* [EC-381] Removed unused settingsPrefix from settings service

* [EC-381] Removed equivalentDomains from settings service and added type AccountSettingsSettings

* [EC-381] Updated settings service settings$ to not be nullable

* [EC-381] Settings default to {}
This commit is contained in:
Rui Tomé
2022-08-30 15:19:09 +01:00
committed by GitHub
parent 88a6541bd8
commit 595412c5fe
8 changed files with 148 additions and 63 deletions

View File

@@ -1,6 +1,10 @@
import { Observable } from "rxjs";
import { AccountSettingsSettings } from "../models/domain/account";
export abstract class SettingsService {
clearCache: () => Promise<void>;
getEquivalentDomains: () => Promise<any>;
settings$: Observable<AccountSettingsSettings>;
setEquivalentDomains: (equivalentDomains: string[][]) => Promise<any>;
clear: (userId?: string) => Promise<void>;
}