From 1f9eb4db6ab4328e44c8587105eb005890052078 Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaadmahmoodspin@users.noreply.github.com>
Date: Thu, 30 Jun 2016 05:04:37 +0500
Subject: Adding expand icon for RHS (#3386)

* Adding expand icon for RHS

Fixing errors

Adding back getTeamInviteLink with better functionality for mobile

Adding vertical align to post__link

Updating improvements for expand RHS stuff

* Improving transition on mobile

* Removing irrelevant changes
---
 webapp/components/search_results_item.jsx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'webapp/components/search_results_item.jsx')

diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index 2f453bc84..217cd5568 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -23,10 +23,17 @@ export default class SearchResultsItem extends React.Component {
         super(props);
 
         this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this);
+        this.shrinkSidebar = this.shrinkSidebar.bind(this);
     }
 
     hideSidebar() {
-        $('.inner-wrap, .sidebar--right').removeClass('move--left');
+        $('.sidebar--right').removeClass('move--left');
+    }
+
+    shrinkSidebar() {
+        setTimeout(() => {
+            this.props.shrink();
+        });
     }
 
     handleFocusRHSClick(e) {
@@ -143,6 +150,7 @@ export default class SearchResultsItem extends React.Component {
 
                                                     this.hideSidebar();
                                                 }
+                                                this.shrinkSidebar();
                                                 browserHistory.push('/' + window.location.pathname.split('/')[1] + '/pl/' + post.id);
                                             }
                                         }
@@ -187,5 +195,6 @@ SearchResultsItem.propTypes = {
     channel: React.PropTypes.object,
     isMentionSearch: React.PropTypes.bool,
     term: React.PropTypes.string,
-    useMilitaryTime: React.PropTypes.bool.isRequired
+    useMilitaryTime: React.PropTypes.bool.isRequired,
+    shrink: React.PropTypes.function
 };
-- 
cgit v1.2.3-1-g7c22

