Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new theme API in react-sdk #11442

Merged
merged 1 commit into from Nov 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/vector/index.js
Expand Up @@ -57,7 +57,7 @@ import WebPlatform from './platform/WebPlatform';
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
import SdkConfig from "matrix-react-sdk/lib/SdkConfig";
import {getBaseTheme, setTheme} from "matrix-react-sdk/lib/theme";
import {getBaseTheme, setTheme, ThemeWatcher} from "matrix-react-sdk/lib/theme";

import Olm from 'olm';

Expand Down Expand Up @@ -258,7 +258,8 @@ async function loadApp() {
// we do this by checking to see if the theme's "base" has loaded first so we can
// safely rely on the assets.
let a;
const theme = SettingsStore.getValue("theme");
const themeWatcher = new ThemeWatcher();
const theme = themeWatcher.getEffectiveTheme();
const baseTheme = getBaseTheme(theme);
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
const href = a.getAttribute("href");
Expand Down