Use a settings watcher to set the theme
Rather than listening for account data updates manually
This commit is contained in:
parent
a0dbd5f62c
commit
80ee68a42f
2 changed files with 12 additions and 11 deletions
|
@ -175,6 +175,9 @@ export default class GeneralUserSettingsTab extends React.Component {
|
|||
|
||||
SettingsStore.setValue("theme", null, SettingLevel.ACCOUNT, newTheme);
|
||||
this.setState({theme: newTheme});
|
||||
// The settings watcher doesn't fire until the echo comes back from the
|
||||
// server, so to make the theme change immediately we need to manually
|
||||
// do the dispatch now
|
||||
dis.dispatch({action: 'set_theme', value: newTheme});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue