From 3c929416643ef64d6f5996a6466363ba4d65a96d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 4 Dec 2024 10:46:24 +0200 Subject: [PATCH] properly reset v3 stuff when applying v2 theme --- src/modules/interface.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/interface.js b/src/modules/interface.js index 26bfe295..c08ca4e4 100644 --- a/src/modules/interface.js +++ b/src/modules/interface.js @@ -490,6 +490,8 @@ const interfaceMod = { ) state.styleNameUsed = style.nameUsed state.styleDataUsed = style.dataUsed + state.themeDataUsed = null + state.themeNameUsed = null } else { const theme = await getData( 'theme', @@ -497,8 +499,12 @@ const interfaceMod = { userThemeV2Source || userThemeV2Snapshot, userThemeV2Name || instanceThemeV2Name ) - // themeNameUsed = theme.nameUsed + state.themeNameUsed = theme.nameUsed state.themeDataUsed = theme.dataUsed + state.styleNameUsed = null + state.styleDataUsed = null + state.paletteNameUsed = null + state.paletteDataUsed = null } }, async applyTheme ( @@ -519,10 +525,6 @@ const interfaceMod = { } await dispatch('getThemeData') - // commit('setOption', { name: 'palette', value: paletteNameUsed }) - // commit('setOption', { name: 'style', value: styleNameUsed }) - // commit('setOption', { name: 'theme', value: themeNameUsed }) - const paletteIss = (() => { if (!state.paletteDataUsed) return null const result = {