From 45d18b364b7633fd52a53c713d9a2a3f06749273 Mon Sep 17 00:00:00 2001
From: khawerrind <khawer.zeshan@gmail.com>
Date: Thu, 12 Jan 2017 20:52:19 +0500
Subject: PLT-5174 Mobile view: Send message link in popover doesn't close RHS
 (#5017)

* Fixed send message link in popover doesn't close RHS

* added isMobile check for closing the rhs when click on send message button from profile popover
---
 webapp/components/profile_popover.jsx | 3 +++
 1 file changed, 3 insertions(+)

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

diff --git a/webapp/components/profile_popover.jsx b/webapp/components/profile_popover.jsx
index d7d9929ee..22cf60004 100644
--- a/webapp/components/profile_popover.jsx
+++ b/webapp/components/profile_popover.jsx
@@ -83,6 +83,9 @@ export default class ProfilePopover extends React.Component {
         openDirectChannelToUser(
             user,
             (channel) => {
+                if (Utils.isMobile()) {
+                    GlobalActions.emitCloseRightHandSide();
+                }
                 this.setState({loadingDMChannel: -1});
                 if (this.props.hide) {
                     this.props.hide();
-- 
cgit v1.2.3-1-g7c22

