[FIX] Add channels to team's flow using different navigators (#3157)

* [FIX] the navigation to AddChannelTeamView and next screens

* Fix the order inside the NewMessageStackNavigator

* Delete spaces after arrow function in onPress

* Adjusted InsideStackNavigator to a conditional animation

* Fixed route for iPad

* Small change

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Reinaldo Neto 2021-05-27 17:41:33 -03:00 committed by GitHub
parent 6e32d1dc6c
commit 5697a136c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -182,6 +182,11 @@ const ChatsStackNavigator = () => {
component={TeamChannelsView}
options={TeamChannelsView.navigationOptions}
/>
<ChatsStack.Screen
name='CreateChannelView'
component={CreateChannelView}
options={CreateChannelView.navigationOptions}
/>
<ChatsStack.Screen
name='AddChannelTeamView'
component={AddChannelTeamView}

View File

@ -38,7 +38,10 @@ const AddChannelTeamView = ({
<List.Separator />
<List.Item
title='Create_New'
onPress={() => navigation.navigate('NewMessageStackNavigator', { screen: 'SelectedUsersViewCreateChannel', params: { nextAction: () => navigation.navigate('CreateChannelView', { teamId }) } })}
onPress={() => (isMasterDetail
? navigation.navigate('SelectedUsersViewCreateChannel', { nextAction: () => navigation.navigate('CreateChannelView', { teamId }) })
: navigation.navigate('SelectedUsersView', { nextAction: () => navigation.navigate('ChatsStackNavigator', { screen: 'CreateChannelView', params: { teamId } }) }))
}
testID='add-channel-team-view-create-channel'
left={() => <List.Icon name='team' />}
right={() => <List.Icon name='chevron-right' />}