mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6283 Hide Preview Mode error bar after enabling email notifications (#6180)
This commit is contained in:
committed by
Corey Hulen
parent
8d1a132eda
commit
7fc663ca75
@@ -6,6 +6,7 @@ import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import ErrorStore from 'stores/error_store.jsx';
|
||||
|
||||
import {ErrorBarTypes} from 'utils/constants.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import AdminSettings from './admin_settings.jsx';
|
||||
@@ -67,10 +68,8 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
}
|
||||
|
||||
handleSaved(newConfig) {
|
||||
const lastError = ErrorStore.getLastError();
|
||||
|
||||
if (lastError && lastError.message === 'error_bar.site_url' && newConfig.ServiceSettings.SiteURL) {
|
||||
ErrorStore.clearLastError(true);
|
||||
if (newConfig.ServiceSettings.SiteURL) {
|
||||
ErrorStore.clearError(ErrorBarTypes.SITE_URL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import ErrorStore from 'stores/error_store.jsx';
|
||||
|
||||
import {ErrorBarTypes} from 'utils/constants.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import AdminSettings from './admin_settings.jsx';
|
||||
@@ -19,6 +22,8 @@ export default class EmailSettings extends AdminSettings {
|
||||
|
||||
this.getConfigFromState = this.getConfigFromState.bind(this);
|
||||
|
||||
this.handleSaved = this.handleSaved.bind(this);
|
||||
|
||||
this.renderSettings = this.renderSettings.bind(this);
|
||||
}
|
||||
|
||||
@@ -39,6 +44,12 @@ export default class EmailSettings extends AdminSettings {
|
||||
return config;
|
||||
}
|
||||
|
||||
handleSaved(newConfig) {
|
||||
if (newConfig.EmailSettings.SendEmailNotifications) {
|
||||
ErrorStore.clearError(ErrorBarTypes.PREVIEW_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
getStateFromConfig(config) {
|
||||
return {
|
||||
sendEmailNotifications: config.EmailSettings.SendEmailNotifications,
|
||||
|
||||
Reference in New Issue
Block a user