Permalink
Browse files

Fix FrescoModule not initialized in Nodes

Reviewed By: AaaChiuuu

Differential Revision: D4687127

fbshipit-source-id: d387ff665374bd4ef40fc2e9c19543f2bacf4a66
  • Loading branch information...
ayc1 authored and facebook-github-bot committed Mar 16, 2017
1 parent 55f48eb commit 63fa621df100df05fbdaf04e93304a7d1dc35f92
@@ -19,6 +19,7 @@ android_library(
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
react_native_target("java/com/facebook/react/common:common"),
react_native_target("java/com/facebook/react/modules/fresco:fresco"),
react_native_target("java/com/facebook/react/modules/i18nmanager:i18nmanager"),
react_native_target("java/com/facebook/react/touch:touch"),
react_native_target("java/com/facebook/react/uimanager:uimanager"),
@@ -18,6 +18,7 @@
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.modules.fresco.FrescoModule;
import com.facebook.react.modules.i18nmanager.I18nUtil;
import com.facebook.react.uimanager.ReactShadowNode;
import com.facebook.react.uimanager.ReactStylesDiffMap;
@@ -98,6 +99,7 @@ protected ReactShadowNode createRootShadowNode() {
// initialization is undefined, and this is pretty much the earliest when we are guarantied
// that Fresco is initalized and DraweeControllerBuilder can be queried. This also happens
// relatively rarely to have any performance considerations.
mReactContext.getNativeModule(FrescoModule.class); // initialize Fresco
DraweeRequestHelper.setDraweeControllerBuilder(
mRCTImageViewManager.getDraweeControllerBuilder());
mRCTImageViewManager = null;

0 comments on commit 63fa621

Please sign in to comment.