mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 17:22:45 +08:00
[ReactNative] Navigator fix opacity reset for presented scene
Summary: jumpN will call enableScene for the dest scene, which makes sure the scene can be made visible, but we need to avoid resetting the opacity for it when it is already the presented scene. There is already a check to make sure we don't reset opacity for the transitioningFrom scene. @public Test Plan: Fixes the issue on Android device when jumping to a scene that is already presented
This commit is contained in:
@@ -689,7 +689,8 @@ var Navigator = React.createClass({
|
||||
var enabledSceneNativeProps = {
|
||||
left: sceneStyle.left,
|
||||
};
|
||||
if (sceneIndex !== this.state.transitionFromIndex) {
|
||||
if (sceneIndex !== this.state.transitionFromIndex &&
|
||||
sceneIndex !== this.state.presentedIndex) {
|
||||
// If we are not in a transition from this index, make sure opacity is 0
|
||||
// to prevent the enabled scene from flashing over the presented scene
|
||||
enabledSceneNativeProps.opacity = 0;
|
||||
|
||||
Reference in New Issue
Block a user