From d927a8c59f362ab15e8c5ccd9bb232e368100eef Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Tue, 9 Feb 2016 13:47:58 -0500 Subject: Reset theme on close of settings modal --- web/react/components/user_settings/user_settings_modal.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'web/react/components/user_settings/user_settings_modal.jsx') 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 = []; -- cgit v1.2.3-1-g7c22