Compare commits
3 Commits
develop
...
add-teams-
Author | SHA1 | Date |
---|---|---|
GleidsonDaniel | 5e2eac2e0c | |
GleidsonDaniel | 2c8fda145c | |
GleidsonDaniel | fe73819099 |
|
@ -41,7 +41,8 @@ import {
|
||||||
getUidDirectMessage,
|
getUidDirectMessage,
|
||||||
hasPermission,
|
hasPermission,
|
||||||
isGroupChat,
|
isGroupChat,
|
||||||
compareServerVersion
|
compareServerVersion,
|
||||||
|
isTeamRoom
|
||||||
} from '../../lib/methods/helpers';
|
} from '../../lib/methods/helpers';
|
||||||
import { Services } from '../../lib/services';
|
import { Services } from '../../lib/services';
|
||||||
import { getSubscriptionByRoomId } from '../../lib/database/services/Subscription';
|
import { getSubscriptionByRoomId } from '../../lib/database/services/Subscription';
|
||||||
|
@ -1033,7 +1034,8 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { room, membersCount, canViewMembers, joined, canAutoTranslate } = this.state;
|
const { room, membersCount, canViewMembers, joined, canAutoTranslate } = this.state;
|
||||||
const { rid, t, prid } = room;
|
const { isMasterDetail, navigation } = this.props;
|
||||||
|
const { rid, t, prid, teamId } = room;
|
||||||
const isGroupChatHandler = isGroupChat(room);
|
const isGroupChatHandler = isGroupChat(room);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1081,7 +1083,32 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
|
||||||
<List.Separator />
|
<List.Separator />
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
|
{teamId && isTeamRoom({ teamId, joined }) ? (
|
||||||
|
<>
|
||||||
|
<List.Item
|
||||||
|
title='Teams'
|
||||||
|
onPress={() => {
|
||||||
|
logEvent(events.ROOM_GO_TEAM_CHANNELS);
|
||||||
|
if (isMasterDetail) {
|
||||||
|
// @ts-ignore TODO: find a way to make this work - OLD Diego :)
|
||||||
|
navigation.navigate('ModalStackNavigator', {
|
||||||
|
screen: 'TeamChannelsView',
|
||||||
|
params: { teamId, joined }
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
navigation.navigate('TeamChannelsView', {
|
||||||
|
teamId,
|
||||||
|
joined
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
testID='room-actions-teams'
|
||||||
|
left={() => <List.Icon name='channel-public' />}
|
||||||
|
showActionIndicator
|
||||||
|
/>
|
||||||
|
<List.Separator />
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
{['l'].includes(t) && !this.isOmnichannelPreview && this.omnichannelPermissions?.canViewCannedResponse ? (
|
{['l'].includes(t) && !this.isOmnichannelPreview && this.omnichannelPermissions?.canViewCannedResponse ? (
|
||||||
<>
|
<>
|
||||||
<List.Item
|
<List.Item
|
||||||
|
|
|
@ -153,23 +153,6 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
goTeamChannels = () => {
|
|
||||||
logEvent(events.ROOM_GO_TEAM_CHANNELS);
|
|
||||||
const { navigation, isMasterDetail, teamId, joined } = this.props;
|
|
||||||
if (!teamId) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (isMasterDetail) {
|
|
||||||
// @ts-ignore TODO: find a way to make this work
|
|
||||||
navigation.navigate('ModalStackNavigator', {
|
|
||||||
screen: 'TeamChannelsView',
|
|
||||||
params: { teamId, joined }
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
navigation.navigate('TeamChannelsView', { teamId, joined });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
goThreadsView = () => {
|
goThreadsView = () => {
|
||||||
logEvent(events.ROOM_GO_THREADS);
|
logEvent(events.ROOM_GO_THREADS);
|
||||||
const { rid, t, navigation, isMasterDetail } = this.props;
|
const { rid, t, navigation, isMasterDetail } = this.props;
|
||||||
|
|
Loading…
Reference in New Issue