fix: change current theme for imported themes

This commit is contained in:
Xylight committed 2024-07-25 12:33:58 -07:00
1 parent e40d3c5b4a
commit 079d6f540c
1 file changed
+2 -1
+2 -1
View File
@@ -214,12 +214,13 @@ if (browser) {
if (oldColors) { if (oldColors) {
themeData.update((td) => ({ themeData.update((td) => ({
...td, ...td,
currentTheme: Math.max(...td.themes.map((t) => t.id)) + 1,
themes: [ themes: [
...td.themes, ...td.themes,
{ {
id: Math.max(...td.themes.map((t) => t.id)) + 1, id: Math.max(...td.themes.map((t) => t.id)) + 1,
colors: JSON.parse(oldColors), colors: JSON.parse(oldColors),
name: t.get('routes.theme.preset.imported') ?? 'Your Theme', name: t.get('routes.theme.preset.imported') || 'Your Theme',
}, },
], ],
})) }))