From 9e8cd937908d5d2e730e94f761d6533eb2d95e28 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Wed, 18 Nov 2015 17:29:06 -0500
Subject: Implementing Permalinks and jumping to post from search. Performance
 improvements.

---
 web/react/components/channel_invite_modal.jsx | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'web/react/components/channel_invite_modal.jsx')

diff --git a/web/react/components/channel_invite_modal.jsx b/web/react/components/channel_invite_modal.jsx
index 6d3203ae5..0518ccb86 100644
--- a/web/react/components/channel_invite_modal.jsx
+++ b/web/react/components/channel_invite_modal.jsx
@@ -22,6 +22,17 @@ export default class ChannelInviteModal extends React.Component {
 
         this.state = this.getStateFromStores();
     }
+    shouldComponentUpdate(nextProps, nextState) {
+        if (!Utils.areObjectsEqual(this.props, nextProps)) {
+            return true;
+        }
+
+        if (!Utils.areObjectsEqual(this.state, nextState)) {
+            return true;
+        }
+
+        return false;
+    }
     getStateFromStores() {
         function getId(user) {
             return user.id;
@@ -105,7 +116,7 @@ export default class ChannelInviteModal extends React.Component {
                 }
 
                 this.setState({inviteError: null, memberIds, nonmembers});
-                AsyncClient.getChannelExtraInfo(true);
+                AsyncClient.getChannelExtraInfo();
             },
             (err) => {
                 this.setState({inviteError: err.message});
-- 
cgit v1.2.3-1-g7c22

