Remove extra divider below Edit Channel in Channel info (#2454)

* Remove extra divider below Edit Channel in Channel info

* Fix indentation
This commit is contained in:
Elias Nahum 2018-12-13 15:34:22 -03:00
parent 7e7b382207
commit 1ab2925ac1
No known key found for this signature in database
GPG key ID: E038DB71E0B61702

View file

@ -468,7 +468,6 @@ export default class ChannelInfo extends PureComponent {
/>
</React.Fragment>
)}
<View style={style.separator}/>
</React.Fragment>
);
};
@ -507,60 +506,61 @@ export default class ChannelInfo extends PureComponent {
style={style.scrollView}
>
{currentChannel.hasOwnProperty('id') &&
<ChannelInfoHeader
createAt={currentChannel.create_at}
creator={currentChannelCreatorName}
displayName={currentChannel.display_name}
header={currentChannel.header}
memberCount={currentChannelMemberCount}
navigator={navigator}
onPermalinkPress={this.handlePermalinkPress}
purpose={currentChannel.purpose}
status={status}
theme={theme}
type={currentChannel.type}
isArchived={currentChannel.delete_at !== 0}
/>
<ChannelInfoHeader
createAt={currentChannel.create_at}
creator={currentChannelCreatorName}
displayName={currentChannel.display_name}
header={currentChannel.header}
memberCount={currentChannelMemberCount}
navigator={navigator}
onPermalinkPress={this.handlePermalinkPress}
purpose={currentChannel.purpose}
status={status}
theme={theme}
type={currentChannel.type}
isArchived={currentChannel.delete_at !== 0}
/>
}
<View style={style.rowsContainer}>
{this.actionsRows(style, channelIsArchived)}
{this.renderLeaveOrDeleteChannelRow() &&
<View>
<ChannelInfoRow
action={this.handleLeave}
defaultMessage='Leave Channel'
icon='sign-out'
textId={t('navbar.leave')}
theme={theme}
/>
</View>
<React.Fragment>
<View style={style.separator}/>
<ChannelInfoRow
action={this.handleLeave}
defaultMessage='Leave Channel'
icon='sign-out'
textId={t('navbar.leave')}
theme={theme}
/>
</React.Fragment>
}
</View>
{this.renderLeaveOrDeleteChannelRow() && canDeleteChannel && !channelIsArchived &&
<View style={style.footer}>
<ChannelInfoRow
action={this.handleDelete}
defaultMessage='Archive Channel'
iconColor='#CA3B27'
icon='archive'
textId={t('mobile.routes.channelInfo.delete_channel')}
textColor='#CA3B27'
theme={theme}
/>
</View>
<View style={style.footer}>
<ChannelInfoRow
action={this.handleDelete}
defaultMessage='Archive Channel'
iconColor='#CA3B27'
icon='archive'
textId={t('mobile.routes.channelInfo.delete_channel')}
textColor='#CA3B27'
theme={theme}
/>
</View>
}
{this.renderCloseDirect() &&
<View style={style.footer}>
<ChannelInfoRow
action={this.handleClose}
defaultMessage={defaultMessage}
icon='times'
iconColor='#CA3B27'
textId={i18nId}
textColor='#CA3B27'
theme={theme}
/>
</View>
<View style={style.footer}>
<ChannelInfoRow
action={this.handleClose}
defaultMessage={defaultMessage}
icon='times'
iconColor='#CA3B27'
textId={i18nId}
textColor='#CA3B27'
theme={theme}
/>
</View>
}
</ScrollView>
</View>