[FIX] Modal freezing app after return from the background #4788
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This issue was found the first time when the user opened the announcement and the announcement's text is a link. Then the user pressed the link and should open the web browser outside of the app. This behavior was forcing the app to go to the background, then when the user resume the app again and tried to close the modal, the app was freezing. This is a known behavior when using a modal as you can see here: facebook/react-native#32504
However, to do a workaround in this case, we aren't re-render the RoomView at the exact time that the app goes to the background, although we are forced to close the modal when resuming the app again and calling the observable again to the list's query.
Issue(s)
How to test or reproduce
Screenshots
Before
Screen.Recording.2022-12-30.at.18.53.51.mov
Screen.Recording.2022-12-30.at.18.54.32.mov
After
Screen.Recording.2022-12-30.at.18.52.44.mov
Types of changes
Checklist
Further comments
TC-340