diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-06-14 12:12:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 12:12:46 -0400 |
commit | 8f87e60231c406d9f26c1b3a84abd725e544a187 (patch) | |
tree | 14349a4b0492f6be37945ea0d437a5f7eb5a7340 /webapp/components/user_profile.jsx | |
parent | a0cc913b85dea5023b705697afa5cd8749a6e5de (diff) | |
download | chat-8f87e60231c406d9f26c1b3a84abd725e544a187.tar.gz chat-8f87e60231c406d9f26c1b3a84abd725e544a187.tar.bz2 chat-8f87e60231c406d9f26c1b3a84abd725e544a187.zip |
Fix bad condition on hiding email addresses and update user etag to include privacy settings (#3327)
Diffstat (limited to 'webapp/components/user_profile.jsx')
-rw-r--r-- | webapp/components/user_profile.jsx | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/webapp/components/user_profile.jsx b/webapp/components/user_profile.jsx index e68ff7eab..ee876347b 100644 --- a/webapp/components/user_profile.jsx +++ b/webapp/components/user_profile.jsx @@ -4,8 +4,6 @@ import * as Utils from 'utils/utils.jsx'; import Client from 'utils/web_client.jsx'; -import {FormattedMessage} from 'react-intl'; - import {Popover, OverlayTrigger} from 'react-bootstrap'; var id = 0; @@ -22,6 +20,7 @@ export default class UserProfile extends React.Component { super(props); this.uniqueId = nextId(); } + shouldComponentUpdate(nextProps) { if (!Utils.areObjectsEqual(nextProps.user, this.props.user)) { return true; @@ -45,6 +44,7 @@ export default class UserProfile extends React.Component { return false; } + render() { let name = '...'; let email = ''; @@ -78,19 +78,7 @@ export default class UserProfile extends React.Component { /> ); - if (!global.window.mm_config.ShowEmailAddress === 'true') { - dataContent.push( - <div - className='text-nowrap' - key='user-popover-no-email' - > - <FormattedMessage - id='user_profile.notShared' - defaultMessage='Email not shared' - /> - </div> - ); - } else { + if (global.window.mm_config.ShowEmailAddress === 'true') { dataContent.push( <div data-toggle='tooltip' |