Show TeamChannelsView only if joined the team
This commit is contained in:
parent
16fd57527a
commit
1ff77118f5
|
@ -18,7 +18,8 @@ class RightButtonsContainer extends Component {
|
|||
teamId: PropTypes.bool,
|
||||
navigation: PropTypes.object,
|
||||
isMasterDetail: PropTypes.bool,
|
||||
toggleFollowThread: PropTypes.func
|
||||
toggleFollowThread: PropTypes.func,
|
||||
joined: PropTypes.bool
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
|
@ -163,7 +164,7 @@ class RightButtonsContainer extends Component {
|
|||
isFollowingThread, tunread, tunreadUser, tunreadGroup
|
||||
} = this.state;
|
||||
const {
|
||||
t, tmid, threadsEnabled, teamId
|
||||
t, tmid, threadsEnabled, teamId, joined
|
||||
} = this.props;
|
||||
if (t === 'l') {
|
||||
return null;
|
||||
|
@ -181,7 +182,7 @@ class RightButtonsContainer extends Component {
|
|||
}
|
||||
return (
|
||||
<HeaderButton.Container>
|
||||
{teamId ? (
|
||||
{teamId && joined ? (
|
||||
<HeaderButton.Item
|
||||
iconName='channel-public'
|
||||
onPress={this.goTeamChannels}
|
||||
|
|
|
@ -301,7 +301,7 @@ class RoomView extends React.Component {
|
|||
|
||||
setHeader = () => {
|
||||
const {
|
||||
room, unreadsCount, roomUserId
|
||||
room, unreadsCount, roomUserId, joined
|
||||
} = this.state;
|
||||
const {
|
||||
navigation, isMasterDetail, theme, baseUrl, user, insets, route
|
||||
|
@ -331,7 +331,7 @@ class RoomView extends React.Component {
|
|||
let numIconsRight = 2;
|
||||
if (tmid) {
|
||||
numIconsRight = 1;
|
||||
} else if (teamId) {
|
||||
} else if (teamId && joined) {
|
||||
numIconsRight = 3;
|
||||
}
|
||||
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight });
|
||||
|
@ -380,6 +380,7 @@ class RoomView extends React.Component {
|
|||
rid={rid}
|
||||
tmid={tmid}
|
||||
teamId={teamId}
|
||||
joined={joined}
|
||||
t={t}
|
||||
navigation={navigation}
|
||||
toggleFollowThread={this.toggleFollowThread}
|
||||
|
|
Loading…
Reference in New Issue