You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Use SettingsStore for default theme
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -891,7 +891,7 @@ module.exports = React.createClass({
|
||||
*/
|
||||
_onSetTheme: function(theme) {
|
||||
if (!theme) {
|
||||
theme = this.props.config.default_theme || 'light';
|
||||
theme = SettingsStore.getValueAt(SettingLevel.DEFAULT, "theme");
|
||||
}
|
||||
|
||||
// look for the stylesheet elements.
|
||||
|
||||
@@ -181,8 +181,8 @@ export default class SettingsStore {
|
||||
|
||||
/**
|
||||
* Gets a setting's value at a particular level, ignoring all levels that are more specific.
|
||||
* @param {"device"|"room-device"|"room-account"|"account"|"room"} level The level to
|
||||
* look at.
|
||||
* @param {"device"|"room-device"|"room-account"|"account"|"room"|"config"|"default"} level The
|
||||
* level to look at.
|
||||
* @param {string} settingName The name of the setting to read.
|
||||
* @param {String} roomId The room ID to read the setting value in, may be null.
|
||||
* @param {boolean} explicit If true, this method will not consider other levels, just the one
|
||||
|
||||
Reference in New Issue
Block a user