From 42e601005fa58d456a4409c601360c4ac2a5a80f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 15 Nov 2017 19:09:03 -0700 Subject: [PATCH] Use SettingsStore to get the default theme Signed-off-by: Travis Ralston --- src/vector/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index bd143240..2b27d4e4 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -77,7 +77,7 @@ import {parseQs, parseQsFromFragment} from './url_utils'; import Platform from './platform'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; -import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore"; +import SettingsStore, {SettingLevel} from "matrix-react-sdk/lib/settings/SettingsStore"; import Tinter from 'matrix-react-sdk/lib/Tinter'; var lastLocationHashSet = null; @@ -299,7 +299,7 @@ async function loadApp() { // as quickly as we possibly can, set a default theme... const styleElements = Object.create(null); let a; - const theme = configJson.default_theme || 'light'; + const theme = SettingsStore.getValueAt(SettingLevel.DEFAULT, "theme"); for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) { const href = a.getAttribute("href"); if (!href) continue;