From 6f92a05c10a88da6a9c6ddd793ee6bacb30be680 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 13 Sep 2022 09:48:57 -0700 Subject: [PATCH] Remove ReactFeatureFlags.enableScrollEventThrottle Summary: Remove feature flag: ReactFeatureFlags.enableScrollEventThrottle This feature has been disabled for a while changelog: [internal] internal Reviewed By: javache Differential Revision: D39449184 fbshipit-source-id: c5ad0d43462422d284e14302fb9d7b39aa37da70 --- .../com/facebook/react/config/ReactFeatureFlags.java | 3 --- .../react/views/scroll/ReactScrollViewHelper.java | 11 ----------- 2 files changed, 14 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index ac0a61c9f58..d8b040ec747 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -111,9 +111,6 @@ public class ReactFeatureFlags { /** Feature Flag to enable the pending event queue in fabric before mounting views */ public static boolean enableFabricPendingEventQueue = false; - /** Feature Flag to control RN Android scrollEventThrottle prop. */ - public static boolean enableScrollEventThrottle = false; - /** * Feature flag that controls how turbo modules are exposed to JS * 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 6e7ad8cc334..b574cb501b0 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 @@ -22,7 +22,6 @@ import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; import com.facebook.react.common.build.ReactBuildConfig; -import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.uimanager.FabricViewStateManager; import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.UIManagerHelper; @@ -102,16 +101,6 @@ public class ReactScrollViewHelper { private static void emitScrollEvent( T scrollView, ScrollEventType scrollEventType, float xVelocity, float yVelocity) { long now = System.currentTimeMillis(); - // Throttle the scroll event if scrollEventThrottle is set to be equal or more than 17 ms. - // We limit the delta to 17ms so that small throttles intended to enable 60fps updates will not - // inadvertently filter out any scroll events. - if (ReactFeatureFlags.enableScrollEventThrottle - && scrollView.getScrollEventThrottle() - >= Math.max(17, now - scrollView.getLastScrollDispatchTime())) { - // Scroll events are throttled. - return; - } - View contentView = scrollView.getChildAt(0); if (contentView == null) {