aboutsummaryrefslogtreecommitdiff
path: root/src/boot/after_store.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/after_store.js')
-rw-r--r--src/boot/after_store.js27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index bcab7a66..a486bd4c 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -13,8 +13,7 @@ import VBodyScrollLock from 'src/directives/body_scroll_lock'
import { windowWidth, windowHeight } from '../services/window_utils/window_utils'
import { getOrCreateApp, getClientToken } from '../services/new_api/oauth.js'
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
-import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js'
-import { applyTheme, applyConfig, tryLoadCache } from '../services/style_setter/style_setter.js'
+import { applyConfig } from '../services/style_setter/style_setter.js'
import FaviconService from '../services/favicon_service/favicon_service.js'
import { initServiceWorker, updateFocus } from '../services/sw/sw.js'
@@ -160,8 +159,6 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
copyInstanceOption('showFeaturesPanel')
copyInstanceOption('hideSitename')
copyInstanceOption('sidebarRight')
-
- return store.dispatch('setTheme', config.theme)
}
const getTOS = async ({ store }) => {
@@ -352,27 +349,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
store.dispatch('setInstanceOption', { name: 'server', value: server })
await setConfig({ store })
-
- const { customTheme, customThemeSource, forceThemeRecompilation } = store.state.config
- const { theme } = store.state.instance
- const customThemePresent = customThemeSource || customTheme
-
- if (!forceThemeRecompilation && tryLoadCache()) {
- store.commit('setThemeApplied')
- } else {
- if (customThemePresent) {
- if (customThemeSource && customThemeSource.themeEngineVersion === CURRENT_VERSION) {
- applyTheme(customThemeSource)
- } else {
- applyTheme(customTheme)
- }
- store.commit('setThemeApplied')
- } else if (theme) {
- // do nothing, it will load asynchronously
- } else {
- console.error('Failed to load any theme!')
- }
- }
+ await store.dispatch('setTheme')
applyConfig(store.state.config)