Fix leave private channel (#719)

This commit is contained in:
enahum 2017-07-05 18:46:05 -04:00 committed by GitHub
parent 32e07bfcce
commit 618d894917
2 changed files with 4 additions and 1 deletions

View file

@ -253,6 +253,7 @@ class ChannelInfo extends PureComponent {
<ScrollView
style={style.scrollView}
>
{currentChannel.hasOwnProperty('id') &&
<ChannelInfoHeader
createAt={currentChannel.create_at}
creator={currentChannelCreatorName}
@ -263,6 +264,7 @@ class ChannelInfo extends PureComponent {
theme={theme}
type={currentChannel.type}
/>
}
<View style={style.rowsContainer}>
<ChannelInfoRow
action={this.handleFavorite}

View file

@ -39,6 +39,7 @@ function mapStateToProps(state, ownProps) {
const isCurrent = currentChannel.id === state.entities.channels.currentChannelId;
const isFavorite = favoriteChannels.indexOf(currentChannel.id) > -1;
const roles = getCurrentUserRoles(state);
const canManageUsers = currentChannel.hasOwnProperty('id') ? canManageChannelMembers(state) : false;
let status;
if (currentChannel.type === General.DM_CHANNEL) {
@ -56,7 +57,7 @@ function mapStateToProps(state, ownProps) {
isFavorite,
status,
theme: getTheme(state),
canManageUsers: canManageChannelMembers(state)
canManageUsers
};
}