1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +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 {
ActiveUserState,
KeyDefinition,
SM_ONBOARDING_DISK,
StateProvider,
UserKeyDefinition,
} from "@bitwarden/common/platform/state";
export type SMOnboardingTasks = Record<string, Record<string, boolean>>;
const SM_ONBOARDING_TASKS_KEY = new KeyDefinition<SMOnboardingTasks>(SM_ONBOARDING_DISK, "tasks", {
deserializer: (b) => b,
});
const SM_ONBOARDING_TASKS_KEY = new UserKeyDefinition<SMOnboardingTasks>(
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({
providedIn: "root",