From 40e8fbaa626cbb34e2bb0f9317511c68c93d4044 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 8 Nov 2016 09:58:17 -0500
Subject: Fix switching to DMs from more DM list (#4494)

---
 webapp/components/more_direct_channels.jsx | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

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

diff --git a/webapp/components/more_direct_channels.jsx b/webapp/components/more_direct_channels.jsx
index 7c61d2f2e..4cb7db28a 100644
--- a/webapp/components/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels.jsx
@@ -39,6 +39,7 @@ export default class MoreDirectChannels extends React.Component {
             users: null,
             loadingDMChannel: -1,
             listType: 'team',
+            show: true,
             search: false
         };
     }
@@ -61,15 +62,17 @@ export default class MoreDirectChannels extends React.Component {
     }
 
     handleHide() {
-        if (this.props.onModalDismissed) {
-            this.props.onModalDismissed();
-        }
+        this.setState({show: false});
     }
 
     handleExit() {
         if (this.exitToDirectChannel) {
             browserHistory.push(this.exitToDirectChannel);
         }
+
+        if (this.props.onModalDismissed) {
+            this.props.onModalDismissed();
+        }
     }
 
     handleShowDirectChannel(teammate, e) {
@@ -226,7 +229,7 @@ export default class MoreDirectChannels extends React.Component {
         return (
             <Modal
                 dialogClassName='more-modal more-direct-channels'
-                show={this.props.show}
+                show={this.state.show}
                 onHide={this.handleHide}
                 onExited={this.handleExit}
             >
@@ -269,6 +272,5 @@ export default class MoreDirectChannels extends React.Component {
 }
 
 MoreDirectChannels.propTypes = {
-    show: React.PropTypes.bool.isRequired,
     onModalDismissed: React.PropTypes.func
 };
-- 
cgit v1.2.3-1-g7c22


From 29efeff09532397a33bb971e91324f673b296559 Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Date: Sat, 12 Nov 2016 00:54:53 +0500
Subject: PLT-4609 - Fixing list modals on mobile (#4536)

* PLT-4609 - Fixing list modals on mobile

* PLT-4609 - Adjust more modal height
---
 webapp/components/more_direct_channels.jsx | 7 -------
 1 file changed, 7 deletions(-)

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

diff --git a/webapp/components/more_direct_channels.jsx b/webapp/components/more_direct_channels.jsx
index 4cb7db28a..50ab5224a 100644
--- a/webapp/components/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels.jsx
@@ -12,7 +12,6 @@ import TeamStore from 'stores/team_store.jsx';
 
 import * as AsyncClient from 'utils/async_client.jsx';
 import * as UserAgent from 'utils/user_agent.jsx';
-import * as Utils from 'utils/utils.jsx';
 import Constants from 'utils/constants.jsx';
 
 import React from 'react';
@@ -185,11 +184,6 @@ export default class MoreDirectChannels extends React.Component {
     }
 
     render() {
-        let maxHeight = 1000;
-        if (Utils.windowHeight() <= 1200) {
-            maxHeight = Utils.windowHeight() - 300;
-        }
-
         let teamToggle;
         if (global.window.mm_config.RestrictDirectMessage === 'any') {
             teamToggle = (
@@ -245,7 +239,6 @@ export default class MoreDirectChannels extends React.Component {
                     {teamToggle}
                     <SearchableUserList
                         key={'moreDirectChannelsList_' + this.state.listType}
-                        style={{maxHeight}}
                         users={this.state.users}
                         usersPerPage={USERS_PER_PAGE}
                         nextPage={this.nextPage}
-- 
cgit v1.2.3-1-g7c22

