implement a simple caching system for themes 3

This commit is contained in:
Henry Jameson 2024-04-22 23:40:39 +03:00
commit 5505a89e8a
8 changed files with 70 additions and 15 deletions

View file

@ -377,7 +377,8 @@ const instance = {
commit('setInstanceOption', { name: 'themeData', value: themeData })
// No need to apply theme if there's user theme already
const { customTheme } = rootState.config
if (customTheme) return
const { themeApplied } = rootState.interface
if (customTheme || themeApplied) return
// New theme presets don't have 'theme' property, they use 'source'
const themeSource = themeData.source