1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Migrate SMOnboardingTasksService (#8595)

This commit is contained in:
Justin Baur
2024-04-10 09:00:00 -05:00
committed by GitHub
parent 84cd01165c
commit 138b24d123

View File

@@ -3,16 +3,21 @@ import { Observable, map } from "rxjs";
import { import {
ActiveUserState, ActiveUserState,
KeyDefinition,
SM_ONBOARDING_DISK, SM_ONBOARDING_DISK,
StateProvider, StateProvider,
UserKeyDefinition,
} from "@bitwarden/common/platform/state"; } from "@bitwarden/common/platform/state";
export type SMOnboardingTasks = Record<string, Record<string, boolean>>; export type SMOnboardingTasks = Record<string, Record<string, boolean>>;
const SM_ONBOARDING_TASKS_KEY = new KeyDefinition<SMOnboardingTasks>(SM_ONBOARDING_DISK, "tasks", { const SM_ONBOARDING_TASKS_KEY = new UserKeyDefinition<SMOnboardingTasks>(
deserializer: (b) => b, SM_ONBOARDING_DISK,
}); "tasks",
{
deserializer: (b) => b,
clearOn: [], // Used to track tasks completed by a user, we don't want to reshow if they've locked or logged out and came back to the app
},
);
@Injectable({ @Injectable({
providedIn: "root", providedIn: "root",