From 6e7eb521b8bbf150bede54f9e2cdae0f37a5a5a9 Mon Sep 17 00:00:00 2001 From: enahum Date: Tue, 31 Oct 2017 16:23:17 -0300 Subject: [PATCH] Show profile images and names only for DMs in channel intro (#1076) --- app/components/channel_intro/channel_intro.js | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/app/components/channel_intro/channel_intro.js b/app/components/channel_intro/channel_intro.js index ff20b6796..bee1cc7ba 100644 --- a/app/components/channel_intro/channel_intro.js +++ b/app/components/channel_intro/channel_intro.js @@ -306,8 +306,9 @@ class ChannelIntro extends PureComponent { }; render() { - const {isLoadingPosts, theme} = this.props; + const {currentChannel, isLoadingPosts, theme} = this.props; const style = getStyleSheet(theme); + const channelType = currentChannel.type; if (isLoadingPosts) { return ( @@ -317,14 +318,23 @@ class ChannelIntro extends PureComponent { ); } + let profiles; + if (channelType === General.DM_CHANNEL || channelType === General.GM_CHANNEL) { + profiles = ( + + + {this.buildProfiles()} + + + {this.buildNames()} + + + ); + } + return ( - - {this.buildProfiles()} - - - {this.buildNames()} - + {profiles} {this.buildContent()}