Skip to content

Commit 58f2e51

Browse files
authored
Merge pull request element-hq#5615 from turt2live/travis/granular_bugs
Use SettingsStore to get the default theme
2 parents cb235a2 + 42e6010 commit 58f2e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vector/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import {parseQs, parseQsFromFragment} from './url_utils';
7777
import Platform from './platform';
7878

7979
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
80-
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
80+
import SettingsStore, {SettingLevel} from "matrix-react-sdk/lib/settings/SettingsStore";
8181
import Tinter from 'matrix-react-sdk/lib/Tinter';
8282

8383
var lastLocationHashSet = null;
@@ -299,7 +299,7 @@ async function loadApp() {
299299
// as quickly as we possibly can, set a default theme...
300300
const styleElements = Object.create(null);
301301
let a;
302-
const theme = configJson.default_theme || 'light';
302+
const theme = SettingsStore.getValueAt(SettingLevel.DEFAULT, "theme");
303303
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
304304
const href = a.getAttribute("href");
305305
if (!href) continue;

0 commit comments

Comments
 (0)