Dirty the shadow node when ReactLithoView requests layout

Reviewed By: shergin

Differential Revision: D5756680

fbshipit-source-id: 409095a2ee61db7ee7a85e12ab64c7806da3b3d9
This commit is contained in:
Andrew Chen (Eng) 2017-09-05 10:48:30 -07:00 committed by Facebook Github Bot
parent 2757260624
commit 5a3828d299
1 changed files with 12 additions and 0 deletions

View File

@ -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.
*/