diff options
Diffstat (limited to 'webapp/components/user_profile.jsx')
-rw-r--r-- | webapp/components/user_profile.jsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/webapp/components/user_profile.jsx b/webapp/components/user_profile.jsx index 04b4f99a4..673422d3f 100644 --- a/webapp/components/user_profile.jsx +++ b/webapp/components/user_profile.jsx @@ -22,6 +22,25 @@ export default class UserProfile extends React.Component { super(props); this.uniqueId = nextId(); } + shouldComponentUpdate(nextProps) { + if (!Utils.areObjectsEqual(nextProps.user, this.props.user)) { + return true; + } + + if (nextProps.overwriteName !== this.props.overwriteName) { + return true; + } + + if (nextProps.overwriteImage !== this.props.overwriteImage) { + return true; + } + + if (nextProps.disablePopover !== this.props.disablePopover) { + return true; + } + + return false; + } render() { let name = '...'; let email = ''; |