Have the theme switcher set the device-level theme to match settings

Fixes https://github.com/vector-im/riot-web/issues/14111

This is a shortcut into the Appearance tab, so use the same level. It was an explicit decision to have the tab set the theme at the device level.
pull/21833/head
Travis Ralston 2020-06-22 13:34:49 -06:00
parent de227c0650
commit 6c48966bf5
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ export default class UserMenuButton extends React.Component<IProps, IState> {
SettingsStore.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
const newTheme = this.state.isDarkTheme ? "light" : "dark";
SettingsStore.setValue("theme", null, SettingLevel.ACCOUNT, newTheme);
SettingsStore.setValue("theme", null, SettingLevel.DEVICE, newTheme); // set at same level as Appearance tab
};
private onSettingsOpen = (ev: ButtonEvent, tabId: string) => {