RN-199 Leave Channel isn't hidden for last member of private channel (#680)
This commit is contained in:
parent
102a56e7cf
commit
e010af3be1
1 changed files with 13 additions and 10 deletions
|
|
@ -287,9 +287,9 @@ class ChannelInfo extends PureComponent {
|
|||
textId={canManageUsers ? 'channel_header.manageMembers' : 'channel_header.viewMembers'}
|
||||
theme={theme}
|
||||
/>
|
||||
<View style={style.separator}/>
|
||||
{canManageUsers &&
|
||||
<View>
|
||||
<View style={style.separator}/>
|
||||
<ChannelInfoRow
|
||||
action={() => preventDoubleTap(this.goToChannelAddMembers)}
|
||||
defaultMessage='Add Members'
|
||||
|
|
@ -297,17 +297,20 @@ class ChannelInfo extends PureComponent {
|
|||
textId='channel_header.addMembers'
|
||||
theme={theme}
|
||||
/>
|
||||
<View style={style.separator}/>
|
||||
</View>
|
||||
}
|
||||
<ChannelInfoRow
|
||||
action={() => preventDoubleTap(this.handleDeleteOrLeave, this, 'leave')}
|
||||
defaultMessage='Leave Channel'
|
||||
icon='sign-out'
|
||||
textId='navbar.leave'
|
||||
shouldRender={this.renderLeaveOrDeleteChannelRow()}
|
||||
theme={theme}
|
||||
/>
|
||||
{this.renderLeaveOrDeleteChannelRow() && currentChannelMemberCount > 1 &&
|
||||
<View>
|
||||
<View style={style.separator}/>
|
||||
<ChannelInfoRow
|
||||
action={() => preventDoubleTap(this.handleDeleteOrLeave, this, 'leave')}
|
||||
defaultMessage='Leave Channel'
|
||||
icon='sign-out'
|
||||
textId='navbar.leave'
|
||||
theme={theme}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
{this.renderLeaveOrDeleteChannelRow() && canDeleteChannel &&
|
||||
<View style={style.footer}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue