diff options
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/channel_header.jsx | 7 | ||||
-rw-r--r-- | webapp/components/user_settings/user_settings_notifications.jsx | 32 | ||||
-rw-r--r-- | webapp/utils/constants.jsx | 3 |
3 files changed, 3 insertions, 39 deletions
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx index 91060f583..34ac53705 100644 --- a/webapp/components/channel_header.jsx +++ b/webapp/components/channel_header.jsx @@ -125,12 +125,9 @@ export default class ChannelHeader extends React.Component { if (user.notify_props && user.notify_props.mention_keys) { const termKeys = UserStore.getMentionKeys(user.id); - if (user.notify_props.all === 'true' && termKeys.indexOf('@all') !== -1) { - termKeys.splice(termKeys.indexOf('@all'), 1); - } - - if (user.notify_props.channel === 'true' && termKeys.indexOf('@channel') !== -1) { + if (user.notify_props.channel === 'true' && termKeys.indexOf('@channel') !== -1 && termKeys.indexOf('@all') !== -1) { termKeys.splice(termKeys.indexOf('@channel'), 1); + termKeys.splice(termKeys.indexOf('@all'), 1); } terms = termKeys.join(' '); } diff --git a/webapp/components/user_settings/user_settings_notifications.jsx b/webapp/components/user_settings/user_settings_notifications.jsx index 6749180f9..1b5e78eb2 100644 --- a/webapp/components/user_settings/user_settings_notifications.jsx +++ b/webapp/components/user_settings/user_settings_notifications.jsx @@ -39,7 +39,6 @@ function getNotificationsStateFromStores() { var mentionKey = false; var customKeys = ''; var firstNameKey = false; - var allKey = false; var channelKey = false; if (user.notify_props) { @@ -67,10 +66,6 @@ function getNotificationsStateFromStores() { firstNameKey = user.notify_props.first_name === 'true'; } - if (user.notify_props.all) { - allKey = user.notify_props.all === 'true'; - } - if (user.notify_props.channel) { channelKey = user.notify_props.channel === 'true'; } @@ -87,7 +82,6 @@ function getNotificationsStateFromStores() { customKeys, customKeysChecked: customKeys.length > 0, firstNameKey, - allKey, channelKey }; } @@ -132,7 +126,6 @@ class NotificationsTab extends React.Component { this.updateUsernameKey = this.updateUsernameKey.bind(this); this.updateMentionKey = this.updateMentionKey.bind(this); this.updateFirstNameKey = this.updateFirstNameKey.bind(this); - this.updateAllKey = this.updateAllKey.bind(this); this.updateChannelKey = this.updateChannelKey.bind(this); this.updateCustomMentionKeys = this.updateCustomMentionKeys.bind(this); this.onCustomChange = this.onCustomChange.bind(this); @@ -228,9 +221,6 @@ class NotificationsTab extends React.Component { updateFirstNameKey(val) { this.setState({firstNameKey: val}); } - updateAllKey(val) { - this.setState({allKey: val}); - } updateChannelKey(val) { this.setState({channelKey: val}); } @@ -730,7 +720,6 @@ class NotificationsTab extends React.Component { let handleUpdateFirstNameKey; let handleUpdateUsernameKey; let handleUpdateMentionKey; - let handleUpdateAllKey; let handleUpdateChannelKey; if (user.first_name) { @@ -807,27 +796,6 @@ class NotificationsTab extends React.Component { </div> ); - handleUpdateAllKey = function handleAllKeyChange(e) { - this.updateAllKey(e.target.checked); - }.bind(this); - inputs.push( - <div key='userNotificationAllOption'> - <div className='checkbox hidden'> - <label> - <input - type='checkbox' - checked={this.state.allKey} - onChange={handleUpdateAllKey} - /> - <FormattedMessage - id='user.settings.notifications.teamWide' - defaultMessage='Team-wide mentions "@all"' - /> - </label> - </div> - </div> - ); - handleUpdateChannelKey = function handleChannelKeyChange(e) { this.updateChannelKey(e.target.checked); }.bind(this); diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index a4d3aee47..428a806e9 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -170,8 +170,7 @@ export default { POST: 5 }, - //SPECIAL_MENTIONS: ['all', 'channel'], - SPECIAL_MENTIONS: ['channel'], + SPECIAL_MENTIONS: ['all', 'channel'], CHARACTER_LIMIT: 4000, IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg'], AUDIO_TYPES: ['mp3', 'wav', 'wma', 'm4a', 'flac', 'aac', 'ogg'], |