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 f0fd212777..1ccc2230fe 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -102,8 +102,6 @@ public class ReactFeatureFlags { public static boolean insertZReorderBarriersOnViewGroupChildren = true; - public static boolean enableScrollViewSnapToAlignmentProp = true; - /** TODO: T103427072 Delete ReactFeatureFlags.enableNestedTextOnPressEventFix */ public static boolean enableNestedTextOnPressEventFix = true; diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java index d5c141b07c..27eb393353 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java @@ -7,7 +7,6 @@ package com.facebook.react.views.scroll; -import static com.facebook.react.config.ReactFeatureFlags.enableScrollViewSnapToAlignmentProp; import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_CENTER; import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISABLED; import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END; @@ -908,9 +907,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView } // pagingEnabled only allows snapping one interval at a time - if (mSnapInterval == 0 - && mSnapOffsets == null - && (!enableScrollViewSnapToAlignmentProp || mSnapToAlignment == SNAP_ALIGNMENT_DISABLED)) { + if (mSnapInterval == 0 && mSnapOffsets == null && mSnapToAlignment == SNAP_ALIGNMENT_DISABLED) { smoothScrollAndSnap(velocityX); return; } @@ -955,7 +952,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView } } } - } else if (enableScrollViewSnapToAlignmentProp && mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) { + } else if (mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) { if (mSnapInterval > 0) { double ratio = (double) targetOffset / mSnapInterval; smallerOffset = diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java index 5ed2e040ba..e9b99417a4 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java @@ -7,7 +7,6 @@ package com.facebook.react.views.scroll; -import static com.facebook.react.config.ReactFeatureFlags.enableScrollViewSnapToAlignmentProp; import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_CENTER; import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISABLED; import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END; @@ -692,9 +691,7 @@ public class ReactScrollView extends ScrollView } // pagingEnabled only allows snapping one interval at a time - if (mSnapInterval == 0 - && mSnapOffsets == null - && (!enableScrollViewSnapToAlignmentProp || mSnapToAlignment == SNAP_ALIGNMENT_DISABLED)) { + if (mSnapInterval == 0 && mSnapOffsets == null && mSnapToAlignment == SNAP_ALIGNMENT_DISABLED) { smoothScrollAndSnap(velocityY); return; } @@ -733,7 +730,7 @@ public class ReactScrollView extends ScrollView } } - } else if (enableScrollViewSnapToAlignmentProp && mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) { + } else if (mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) { if (mSnapInterval > 0) { double ratio = (double) targetOffset / mSnapInterval; smallerOffset =