fix(ui/settings): properly set selectedBackground

This commit is contained in:
sethburkart123
2024-09-09 18:01:06 +10:00
parent 7951358cd0
commit 2d23669aa3
@@ -65,6 +65,7 @@
await openDatabase(); await openDatabase();
const data = await readAllData(); const data = await readAllData();
selectedBackground = await getTheme();
if (!isVisible) { if (!isVisible) {
backgrounds = data; backgrounds = data;
@@ -127,7 +128,9 @@
}); });
$effect(() => { $effect(() => {
if (error) {
console.error(error); console.error(error);
}
}); });
onMount(() => { onMount(() => {
@@ -139,7 +142,6 @@
isVisible = true; isVisible = true;
loadBackgrounds(); loadBackgrounds();
}, 100); }, 100);
selectedBackground = getTheme();
observer.disconnect(); observer.disconnect();
} }
}); });