rename traces of element(-dark) theme in code

pull/21833/head
Bruno Windels 2020-07-14 18:40:32 +02:00
parent 25d3257d80
commit b1444146e6
2 changed files with 2 additions and 4 deletions

View File

@ -98,7 +98,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
if (theme.startsWith("custom-")) { if (theme.startsWith("custom-")) {
return getCustomTheme(theme.substring("custom-".length)).is_dark; return getCustomTheme(theme.substring("custom-".length)).is_dark;
} }
return theme === "dark" || theme === "element-dark"; return theme === "dark";
} }
private onProfileUpdate = async () => { private onProfileUpdate = async () => {
@ -152,7 +152,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
// Disable system theme matching if the user hits this button // Disable system theme matching if the user hits this button
SettingsStore.setValue("use_system_theme", null, SettingLevel.DEVICE, false); SettingsStore.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
const newTheme = this.state.isDarkTheme ? "element" : "element-dark"; const newTheme = this.state.isDarkTheme ? "light" : "dark";
SettingsStore.setValue("theme", null, SettingLevel.DEVICE, newTheme); // set at same level as Appearance tab SettingsStore.setValue("theme", null, SettingLevel.DEVICE, newTheme); // set at same level as Appearance tab
}; };

View File

@ -26,8 +26,6 @@ export function enumerateThemes() {
const BUILTIN_THEMES = { const BUILTIN_THEMES = {
"light": _t("Light"), "light": _t("Light"),
"dark": _t("Dark"), "dark": _t("Dark"),
"element": _t("Element Light"),
"element-dark": _t("Element Dark"),
}; };
const customThemes = SettingsStore.getValue("custom_themes"); const customThemes = SettingsStore.getValue("custom_themes");
const customThemeNames = {}; const customThemeNames = {};