Add Dependency Injection, nodes support for RN/Components integration

Summary:
This should probably be two separate diffs, sorry. It takes forever to test these things on fb4a though.

The nodes GK was turned up in fb4a, so I had to make a few changes to make the existing integration work.

Reviewed By: lexs, emilsjolander

Differential Revision: D3863226
This commit is contained in:
Andy Street 2016-09-15 09:15:33 -07:00 committed by Ahmed El-Helw
parent 173795c816
commit f30cc5d9a7
1 changed files with 17 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import com.facebook.csslayout.CSSNodeAPI;
import com.facebook.react.uimanager.ReactStylesDiffMap;
import com.facebook.react.uimanager.ReactShadowNode;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.UIViewOperationQueue;
import com.facebook.react.uimanager.ViewGroupManager;
import com.facebook.react.uimanager.ViewManager;
@ -67,6 +68,14 @@ import com.facebook.react.uimanager.ViewManager;
// suppress, this is handled by a ViewManager
}
@Override
public void setReactTag(int reactTag) {
super.setReactTag(reactTag);
if (mReactShadowNode != null) {
mReactShadowNode.setReactTag(reactTag);
}
}
@Override
public void setThemedContext(ThemedReactContext themedContext) {
super.setThemedContext(themedContext);
@ -98,4 +107,12 @@ import com.facebook.react.uimanager.ViewManager;
dirty();
}
}
@Override
public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue) {
if (mReactShadowNode != null && mReactShadowNode.hasUnseenUpdates()) {
mReactShadowNode.onCollectExtraUpdates(uiViewOperationQueue);
markUpdateSeen();
}
}
}