mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Reset theme on close of settings modal
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user