Ship ReactFeatureFlags.enableScrollViewSnapToAlignmentProp
Summary: This diff ships ReactFeatureFlags.enableScrollViewSnapToAlignmentProp, QE showed neutral metrics in fb4a changelog: [internal] internal Reviewed By: philIip Differential Revision: D33781627 fbshipit-source-id: d4e52d8bdf1acb4904e92f13b7d721582d140ba3
This commit is contained in:
Родитель
11b7443afb
Коммит
34dcbfb8d9
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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 =
|
||||
|
|
Загрузка…
Ссылка в новой задаче