From 5a3828d299be0e68b5baf8b55a8578c207f443a9 Mon Sep 17 00:00:00 2001 From: "Andrew Chen (Eng)" Date: Tue, 5 Sep 2017 10:48:30 -0700 Subject: [PATCH] Dirty the shadow node when ReactLithoView requests layout Reviewed By: shergin Differential Revision: D5756680 fbshipit-source-id: 409095a2ee61db7ee7a85e12ab64c7806da3b3d9 --- .../facebook/react/uimanager/UIManagerModule.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index b71a3e9d9ad..73c27377e05 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -581,6 +581,18 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements return mUIImplementation.resolveRootTagFromReactTag(reactTag); } + /** Dirties the node associated with the given react tag */ + public void invalidateNodeLayout(int tag) { + ReactShadowNode node = mUIImplementation.resolveShadowNode(tag); + if (node == null) { + FLog.w( + ReactConstants.TAG, + "Warning : attempted to dirty a non-existent react shadow node. reactTag=" + tag); + return; + } + node.dirty(); + } + /** * Listener that drops the CSSNode pool on low memory when the app is backgrounded. */