Show profile images and names only for DMs in channel intro (#1076)

This commit is contained in:
enahum 2017-10-31 16:23:17 -03:00
parent 2e10168c73
commit 6e7eb521b8

View file

@ -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 = (
<View>
<View style={style.profilesContainer}>
{this.buildProfiles()}
</View>
<View style={style.namesContainer}>
{this.buildNames()}
</View>
</View>
);
}
return (
<View style={style.container}>
<View style={style.profilesContainer}>
{this.buildProfiles()}
</View>
<View style={style.namesContainer}>
{this.buildNames()}
</View>
{profiles}
<View style={style.contentContainer}>
{this.buildContent()}
</View>