PLT-4859 Email notifications sent when email notifications set to never (#4711)

Этот коммит содержится в:
enahum
2016-12-06 12:22:19 -03:00
коммит произвёл Joram Wilander
родитель b477e384d8
Коммит 4df1ad2b28
2 изменённых файлов: 6 добавлений и 6 удалений

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

@@ -490,5 +490,5 @@ export default class CreateComment extends React.Component {
CreateComment.propTypes = { CreateComment.propTypes = {
channelId: React.PropTypes.string.isRequired, channelId: React.PropTypes.string.isRequired,
rootId: React.PropTypes.string.isRequired, rootId: React.PropTypes.string.isRequired,
latestPostId: React.PropTypes.string.isRequired latestPostId: React.PropTypes.string
}; };

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

@@ -64,7 +64,7 @@ export default class EmailNotificationSetting extends React.Component {
if (this.props.activeSection !== 'email') { if (this.props.activeSection !== 'email') {
let description; let description;
if (this.props.enableEmail === 'true') { if (this.props.enableEmail) {
switch (this.state.emailInterval) { switch (this.state.emailInterval) {
case INTERVAL_IMMEDIATE: case INTERVAL_IMMEDIATE:
description = ( description = (
@@ -119,7 +119,7 @@ export default class EmailNotificationSetting extends React.Component {
<input <input
type='radio' type='radio'
name='emailNotifications' name='emailNotifications'
checked={this.props.enableEmail === 'true' && this.state.emailInterval === INTERVAL_FIFTEEN_MINUTES} checked={this.props.enableEmail && this.state.emailInterval === INTERVAL_FIFTEEN_MINUTES}
onChange={this.handleChange.bind(this, 'true', INTERVAL_FIFTEEN_MINUTES)} onChange={this.handleChange.bind(this, 'true', INTERVAL_FIFTEEN_MINUTES)}
/> />
<FormattedMessage <FormattedMessage
@@ -134,7 +134,7 @@ export default class EmailNotificationSetting extends React.Component {
<input <input
type='radio' type='radio'
name='emailNotifications' name='emailNotifications'
checked={this.props.enableEmail === 'true' && this.state.emailInterval === INTERVAL_HOUR} checked={this.props.enableEmail && this.state.emailInterval === INTERVAL_HOUR}
onChange={this.handleChange.bind(this, 'true', INTERVAL_HOUR)} onChange={this.handleChange.bind(this, 'true', INTERVAL_HOUR)}
/> />
<FormattedMessage <FormattedMessage
@@ -170,7 +170,7 @@ export default class EmailNotificationSetting extends React.Component {
<input <input
type='radio' type='radio'
name='emailNotifications' name='emailNotifications'
checked={this.props.enableEmail === 'true' && this.state.emailInterval === INTERVAL_IMMEDIATE} checked={this.props.enableEmail && this.state.emailInterval === INTERVAL_IMMEDIATE}
onChange={this.handleChange.bind(this, 'true', INTERVAL_IMMEDIATE)} onChange={this.handleChange.bind(this, 'true', INTERVAL_IMMEDIATE)}
/> />
<FormattedMessage <FormattedMessage
@@ -185,7 +185,7 @@ export default class EmailNotificationSetting extends React.Component {
<input <input
type='radio' type='radio'
name='emailNotifications' name='emailNotifications'
checked={this.props.enableEmail === 'false'} checked={!this.props.enableEmail}
onChange={this.handleChange.bind(this, 'false', INTERVAL_IMMEDIATE)} onChange={this.handleChange.bind(this, 'false', INTERVAL_IMMEDIATE)}
/> />
<FormattedMessage <FormattedMessage