From 7a5e4c56d30bbbce7a178f03e7cb47629994c6fb Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Wed, 24 Jul 2024 10:27:06 +0000 Subject: [PATCH] web/settings: make old settings migration use initial schema --- web/src/lib/settings/migrate.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/lib/settings/migrate.ts b/web/src/lib/settings/migrate.ts index 64c9ae53..81feb99f 100644 --- a/web/src/lib/settings/migrate.ts +++ b/web/src/lib/settings/migrate.ts @@ -1,6 +1,4 @@ -import type { RecursivePartial } from "$lib/types/generic"; -import type { CobaltSettings } from "$lib/types/settings"; -import defaultSettings from "./defaults"; +import type { AllPartialSettingsWithSchema } from "$lib/types/settings"; const oldSwitcherValues = { theme: ['auto', 'light', 'dark'], @@ -85,8 +83,8 @@ export const migrateOldSettings = () => { return; } - const migrated: RecursivePartial = { - schemaVersion: defaultSettings.schemaVersion, + const migrated: AllPartialSettingsWithSchema = { + schemaVersion: 2, appearance: { theme: getLiteral('theme'), reduceTransparency: getBool('reduceTransparency'),