From b28cd93b687ca556407dad03a1a3c096473dd1c5 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 11 Dec 2019 18:35:55 -0800 Subject: [PATCH] Migrate events on ReactRootView and ScrollView to be bridgeless Summary: This diff migrates a couple of events callsites of ReactRootView and ScrollView to be compatible with Bridgeless React mode Changelog: [internal] Reviewed By: ejanzer Differential Revision: D18862857 fbshipit-source-id: f8e0d2d684bfaf84e9c138746507bb7728481b18 --- .../facebook/react/views/scroll/ReactScrollViewHelper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java index a27a71bcc45..3f7b829d4ee 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java @@ -11,7 +11,7 @@ import android.view.View; import android.view.ViewGroup; import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.bridge.ReactContext; -import com.facebook.react.uimanager.UIManagerModule; +import com.facebook.react.uimanager.UIManagerHelper; /** Helper class that deals with emitting Scroll Events. */ public class ReactScrollViewHelper { @@ -57,9 +57,7 @@ public class ReactScrollViewHelper { } ReactContext reactContext = (ReactContext) scrollView.getContext(); - reactContext - .getNativeModule(UIManagerModule.class) - .getEventDispatcher() + UIManagerHelper.getEventDispatcherForReactTag(reactContext, scrollView.getId()) .dispatchEvent( ScrollEvent.obtain( scrollView.getId(),