Conversation
Author
|
This fix introduced a new crash: I will try to fix it again. |
Author
|
fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
On Android, navigating back from a native-stack screen containing PagerView can make the pager content disappear before the screen's exit animation finishes. The screen background and views outside the pager remain visible while the pager becomes blank.
React Native removes the pager's children and calls
onDropViewInstancewhilereact-native-screensis still retaining the native view hierarchy for the exit transition. Updating the Compose page list and destroying the composition at that point clears the content too early.This change:
startViewTransition, while keeping React Native's logical child list up to date.endViewTransition, with window detachment as a cleanup fallback.This affects only the Android Compose implementation.
Test Plan
Before this fix: https://github.com/user-attachments/assets/3ab80ccc-efda-4c53-a2ee-511e689dd4fe
After this fix: https://github.com/user-attachments/assets/4a8aaa55-cf4d-407f-8621-d6d7c9ab47e9
What's required for testing (prerequisites)?
react-native-pager-viewafter v9.0.3What are the steps to reproduce (after prerequisites)?
Compatibility
Checklist