aboutsummaryrefslogtreecommitdiff
path: root/src/modules/instance.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-05-04 11:05:05 +0300
committerShpuld Shpuldson <shp@cock.li>2020-05-04 11:05:05 +0300
commit101eebb40be4dd87df83247e9db655c3cb135f48 (patch)
tree043b1c06a078d0b845bc036a87165ac2568391b2 /src/modules/instance.js
parent39e3917118293912b2af09f509457d718f0207c9 (diff)
parent9b349b40196778abe1a2cdb1d241d4c9572d305c (diff)
Merge branch 'develop' into fix/signup-without-email
Diffstat (limited to 'src/modules/instance.js')
-rw-r--r--src/modules/instance.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 8781646d..ffece311 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -1,5 +1,6 @@
import { set } from 'vue'
import { getPreset, applyTheme } from '../services/style_setter/style_setter.js'
+import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js'
import { instanceDefaultProperties } from './config.js'
const defaultState = {
@@ -159,7 +160,14 @@ const instance = {
// No need to apply theme if there's user theme already
const { customTheme } = rootState.config
if (customTheme) return
- applyTheme(themeData.theme)
+
+ // New theme presets don't have 'theme' property, they use 'source'
+ const themeSource = themeData.source
+ if (!themeData.theme || (themeSource && themeSource.themeEngineVersion === CURRENT_VERSION)) {
+ applyTheme(themeSource)
+ } else {
+ applyTheme(themeData.theme)
+ }
})
},
fetchEmoji ({ dispatch, state }) {