Merge pull request #2118 from mattermost/reset-theme-fix

Reset theme on close of settings modal
Этот коммит содержится в:
Christopher Speller
2016-02-09 14:04:14 -05:00
родитель dc186240d5 d927a8c59f
Коммит 81b2669866

Просмотреть файл

@@ -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 = [];