Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue 840 [BUG] Profile View inputs state sets to default every 5 secs #841

Conversation

IlarionHalushka
Copy link
Contributor

@RocketChat/ReactNative
Closes #840

Video after fix:
https://drive.google.com/file/d/1060_C7yYeMTYkPxZwbgUKGl6HNzQUvVe/view?usp=sharing

With PR #762 a new functionality was added to /lib/rocketchat.js where new subscription was added:
this.sdk.subscribe('activeUsers') triggered every 5 secs. So the props of ProfileView were updating -->> which updated the state every 5 secs to defaults.

The actual root cause was in componentWillReceiveProps method which checked for props objects equality with !==.

@diegolmello
Copy link
Member

@IlarionHalushka Nice! Thanks.

@diegolmello
Copy link
Member

@IlarionHalushka Just a tip before reviewing it.
Always add media directly to Github instead of uploading them on 3rd party services.
This will ensure very old PRs still have a history of what happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Profile View inputs' state sets to default every 5 secs
3 participants