Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ internal class ScreensAnimation(
t: Transformation,
) {
super.applyTransformation(interpolatedTime, t)
// interpolated time should be the progress of the current transition
mFragment.dispatchTransitionProgressEvent(interpolatedTime, !mFragment.isResumed)
// This is called while android is drawing. The event might be intercepted by reanimated
// which could trigger a sync mount, which can alter the native view hierarchy, which
// could lead to a crash, see: https://github.com/software-mansion/react-native-screens/issues/3321
mFragment.view?.post {
// interpolated time should be the progress of the current transition
mFragment.dispatchTransitionProgressEvent(interpolatedTime, !mFragment.isResumed)
}
}
}