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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 4 deletions

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", {
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",