mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
[SM-1065] SmOnboarding state provider (#8037)
* Create state definition * Create SmOnboardingTaskService * Replace usage of stateService value with state new state provider * Migrate old state values to state provider * Fix injection of SmOnboardingTasksService * Remove smOnboardingTasks from state * Fix state provider imports * Fix migration after merge from main * Move null handling to SMOnboardingTasksService
This commit is contained in:
@@ -2154,28 +2154,6 @@ export class StateService<
|
||||
);
|
||||
}
|
||||
|
||||
async getSMOnboardingTasks(
|
||||
options?: StorageOptions,
|
||||
): Promise<Record<string, Record<string, boolean>>> {
|
||||
return (
|
||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
|
||||
)?.settings?.smOnboardingTasks;
|
||||
}
|
||||
|
||||
async setSMOnboardingTasks(
|
||||
value: Record<string, Record<string, boolean>>,
|
||||
options?: StorageOptions,
|
||||
): Promise<void> {
|
||||
const account = await this.getAccount(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
||||
);
|
||||
account.settings.smOnboardingTasks = value;
|
||||
return await this.saveAccount(
|
||||
account,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
||||
);
|
||||
}
|
||||
|
||||
async getDeepLinkRedirectUrl(options?: StorageOptions): Promise<string> {
|
||||
return (
|
||||
await this.getGlobals(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||
|
||||
Reference in New Issue
Block a user