summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/react/components/user_settings/user_settings_modal.jsx13
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 = [];