From 011303cc0742cce40abbc22783dabd26fdadf80f Mon Sep 17 00:00:00 2001 From: WardPearce Date: Thu, 5 Mar 2026 16:13:10 +1300 Subject: [PATCH] Fix invidious auth not syncing across accounts --- materialious/src/lib/externalSettings/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/materialious/src/lib/externalSettings/index.ts b/materialious/src/lib/externalSettings/index.ts index 22d7e944..6eb3109f 100644 --- a/materialious/src/lib/externalSettings/index.ts +++ b/materialious/src/lib/externalSettings/index.ts @@ -21,17 +21,21 @@ export async function syncSettingsToBackend() { getKeyValue(store.name).then((currentKeyValue) => { if (currentKeyValue !== null || allowNullOverwrite.includes(store.name)) { const currentKeyValueParsed = parseWithSchema(store.schema, currentKeyValue); - if (currentKeyValueParsed !== null && currentKeyValueParsed !== undefined) { + if ( + (currentKeyValueParsed !== null && currentKeyValueParsed !== undefined) || + allowNullOverwrite.includes(store.name) + ) { store.store.set(currentKeyValueParsed); } } }); - let initalLoad = true; + let initialLoad = true; store.store.subscribe((value) => { if (!get(rawMasterKeyStore)) return; - if (initalLoad) { - initalLoad = false; + + if (initialLoad && !allowNullOverwrite.includes(store.name)) { + initialLoad = false; return; }