Skip to content

Commit

Permalink
Migrate events on ReactRootView and ScrollView to be bridgeless
Browse files Browse the repository at this point in the history
Summary:
This diff migrates ScrollView events to be compatible with Bridgeless React mode
Changelog: [internal]

Reviewed By: makovkastar

Differential Revision: D19383061

fbshipit-source-id: d303d104a7f3bde8ba54c7be830691146c19072e
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jan 23, 2020
1 parent 7fff467 commit 2db0c75
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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 {
Expand Down Expand Up @@ -57,9 +57,7 @@ private static void emitScrollEvent(
}

ReactContext reactContext = (ReactContext) scrollView.getContext();
reactContext
.getNativeModule(UIManagerModule.class)
.getEventDispatcher()
UIManagerHelper.getEventDispatcherForReactTag(reactContext, scrollView.getId())
.dispatchEvent(
ScrollEvent.obtain(
scrollView.getId(),
Expand Down

0 comments on commit 2db0c75

Please sign in to comment.