mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4a0aa8f7c7
commit
6f92a05c10
@@ -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
|
||||
*
|
||||
|
||||
@@ -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 <T extends ViewGroup & HasScrollEventThrottle> 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) {
|
||||
|
||||
Reference in New Issue
Block a user