forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
react-native+0.75.2+014+fixNavigationAnimations.patch
39 lines (37 loc) · 1.46 KB
/
react-native+0.75.2+014+fixNavigationAnimations.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js b/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js
index d6c3462..582892b 100644
--- a/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js
+++ b/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js
@@ -46,6 +46,7 @@ export default class AnimatedProps extends AnimatedNode {
super();
this._props = createAnimatedProps(props);
this._callback = callback;
+ this._connectedToView = false;
}
__getValue(): Object {
@@ -120,6 +121,8 @@ export default class AnimatedProps extends AnimatedNode {
if (this._animatedView) {
this.__connectAnimatedView();
}
+ } else if (!this._connectedToView && this._animatedView) {
+ this.__connectAnimatedView();
}
}
@@ -140,6 +143,8 @@ export default class AnimatedProps extends AnimatedNode {
nativeViewTag != null,
'Unable to locate attached view in the native tree',
);
+
+ this._connectedToView = true;
NativeAnimatedHelper.API.connectAnimatedNodeToView(
this.__getNativeTag(),
nativeViewTag,
@@ -153,6 +158,8 @@ export default class AnimatedProps extends AnimatedNode {
nativeViewTag != null,
'Unable to locate attached view in the native tree',
);
+
+ this._connectedToView = false;
NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(
this.__getNativeTag(),
nativeViewTag,