diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-02-09 14:04:14 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-02-09 14:04:14 -0500 |
commit | 81b26698664572adceacd93b4ff816ef2cc907e0 (patch) | |
tree | 183ba8e7e06fbbe0af4beb90fbaed07f947dbd13 /web | |
parent | dc186240d559a230445d3193e7468d30721ad10c (diff) | |
parent | d927a8c59f362ab15e8c5ccd9bb232e368100eef (diff) | |
download | chat-81b26698664572adceacd93b4ff816ef2cc907e0.tar.gz chat-81b26698664572adceacd93b4ff816ef2cc907e0.tar.bz2 chat-81b26698664572adceacd93b4ff816ef2cc907e0.zip |
Merge pull request #2118 from mattermost/reset-theme-fix
Reset theme on close of settings modal
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/user_settings/user_settings_modal.jsx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx index 90f28822b..a7541073e 100644 --- a/web/react/components/user_settings/user_settings_modal.jsx +++ b/web/react/components/user_settings/user_settings_modal.jsx @@ -113,6 +113,7 @@ class UserSettingsModal extends React.Component { return false; } + this.resetTheme(); this.deactivateTab(); this.props.onModalDismissed(); } @@ -215,15 +216,19 @@ class UserSettingsModal extends React.Component { this.showConfirmModal(() => this.updateSection(section, true)); } else { if (this.state.active_section === 'theme' && section !== 'theme') { - const user = UserStore.getCurrentUser(); - if (user.theme_props != null) { - Utils.applyTheme(user.theme_props); - } + this.resetTheme(); } this.setState({active_section: section}); } } + resetTheme() { + const user = UserStore.getCurrentUser(); + if (user.theme_props != null) { + Utils.applyTheme(user.theme_props); + } + } + render() { const {formatMessage} = this.props.intl; var tabs = []; |