Move reminders to new persisted state layer (#1834)

This commit is contained in:
Paul Frazee 2023-11-07 16:39:13 -08:00 committed by GitHub
parent 96d8faf4b0
commit 2acc88e78d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 100 deletions

View file

@ -76,9 +76,9 @@ export function transform(legacy: LegacySchema): Schema {
defaults.session.currentAccount,
},
reminders: {
lastEmailConfirmReminder:
lastEmailConfirm:
legacy.reminders.lastEmailConfirm ||
defaults.reminders.lastEmailConfirmReminder,
defaults.reminders.lastEmailConfirm,
},
languagePrefs: {
primaryLanguage:

View file

@ -19,7 +19,7 @@ export const schema = z.object({
currentAccount: accountSchema.optional(),
}),
reminders: z.object({
lastEmailConfirmReminder: z.string().optional(),
lastEmailConfirm: z.string().optional(),
}),
languagePrefs: z.object({
primaryLanguage: z.string(), // should move to server
@ -46,7 +46,7 @@ export const defaults: Schema = {
currentAccount: undefined,
},
reminders: {
lastEmailConfirmReminder: undefined,
lastEmailConfirm: undefined,
},
languagePrefs: {
primaryLanguage: deviceLocales[0] || 'en',