File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
android/src/main/java/com/swmansion/rnscreens/stack/anim Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ internal class ScreensAnimation(
1212 t : Transformation ,
1313 ) {
1414 super .applyTransformation(interpolatedTime, t)
15- // interpolated time should be the progress of the current transition
16- mFragment.dispatchTransitionProgressEvent(interpolatedTime, ! mFragment.isResumed)
15+ // This is called while android is drawing. The event might be intercepted by reanimated
16+ // which could trigger a sync mount, which can alter the native view hierarchy, which
17+ // could lead to a crash, see: https://github.com/software-mansion/react-native-screens/issues/3321
18+ mFragment.view?.post {
19+ // interpolated time should be the progress of the current transition
20+ mFragment.dispatchTransitionProgressEvent(interpolatedTime, ! mFragment.isResumed)
21+ }
1722 }
1823}
You can’t perform that action at this time.
0 commit comments