[FIX] Added navigation from Register to Room List#1568
[FIX] Added navigation from Register to Room List#1568m1-key wants to merge 3 commits intoRocketChat:developfrom
Conversation
djorkaeffalexandre
left a comment
There was a problem hiding this comment.
Only need few changes. Thanks a lot! 😁
app/views/RegisterView.js
Outdated
| Alert.alert(I18n.t('Oops'), e.data.error); | ||
| } | ||
| this.setState({ saving: false }); | ||
| const { navigation } = this.props; |
There was a problem hiding this comment.
On both cases you can't redirect to RoomsList if some error occurred on catch. 😁
I think it's better you can put it after await loginRequest({ user: email, password });.
There was a problem hiding this comment.
So basically I have to put move changes in try block, is it @djorkaeffalexandre ?
app/views/SetUsernameView.js
Outdated
| log(e); | ||
| } | ||
| this.setState({ saving: false }); | ||
| const { navigation } = this.props; |
There was a problem hiding this comment.
Same of comment above.
There was a problem hiding this comment.
I have made the changes, now you can verify that sir .
|
Hello @m1-key , how you can see here: https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/app/sagas/login.js#L118, we make this navigation on |
|
@djorkaeffalexandre I have change the navigation of |
|
@djorkaeffalexandre any changes required in this ? |

@RocketChat/ReactNative
Closes #1544
I added just 2 line code into the RegisterView.js and SetUsername.js , first line extracted the navigation from the props and then in the second line I navigated from above two mentioned screens to the RoomsListView. So earlier when we click on Register button , nothing happens which can be seen on screen. Now on pressing the Register Button , we will be directed to the RoomsListView.
Here is view of that :