mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
NativeAnimatedModule: don't restore default values when disconnected nodes in Fabric
Summary: See title. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D22488069 fbshipit-source-id: a0cb2dc65e5ea4befd7921acd194a67840b1498d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
80f13412e5
commit
7bf56e1902
@@ -13,6 +13,8 @@ import com.facebook.react.bridge.JavaOnlyMap;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
||||
import com.facebook.react.bridge.UIManager;
|
||||
import com.facebook.react.uimanager.common.UIManagerType;
|
||||
import com.facebook.react.uimanager.common.ViewUtil;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -69,6 +71,14 @@ import java.util.Map;
|
||||
if (mConnectedViewTag == -1) {
|
||||
return;
|
||||
}
|
||||
// Don't restore default values in Fabric.
|
||||
// In Non-Fabric this had the effect of "restore the value to whatever the value was on the
|
||||
// ShadowNode instead of in the View hierarchy". However, "synchronouslyUpdateViewOnUIThread"
|
||||
// will not have that impact on Fabric, because the FabricUIManager doesn't have access to the
|
||||
// ShadowNode layer.
|
||||
if (ViewUtil.getUIManagerType(mConnectedViewTag) == UIManagerType.FABRIC) {
|
||||
return;
|
||||
}
|
||||
|
||||
ReadableMapKeySetIterator it = mPropMap.keySetIterator();
|
||||
while (it.hasNextKey()) {
|
||||
|
||||
Reference in New Issue
Block a user