mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove no-op MaintainVisibleScrollPositionHelper#updateScrollPosition() (#56535)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56535 Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D101331886 fbshipit-source-id: fb655f3edab86ebf0cca5f19663337ab2dee7a9d
This commit is contained in:
1 parent
dbd3255194
commit
90017b5fd2
4 files changed
+1
-19
No files matched your search
-8
@@ -82,14 +82,6 @@ internal class MaintainVisibleScrollPositionHelper<ScrollViewT>(
|
||||
uIManager.removeUIManagerEventListener(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the scroll position of the managed ScrollView. This should be called after layout has
|
||||
* been updated.
|
||||
*
|
||||
* On Fabric this will be called internally in `didMountItems`.
|
||||
*/
|
||||
fun updateScrollPosition() = Unit
|
||||
|
||||
private fun updateScrollPositionInternal() {
|
||||
val config = config ?: return
|
||||
val firstVisibleViewRef = firstVisibleViewRef ?: return
|
||||
|
||||
-2
@@ -1681,8 +1681,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
||||
// does not work in RTL.
|
||||
if (v.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
||||
adjustPositionForContentChangeRTL(left, right, oldLeft, oldRight);
|
||||
} else if (mMaintainVisibleContentPositionHelper != null) {
|
||||
mMaintainVisibleContentPositionHelper.updateScrollPosition();
|
||||
}
|
||||
ReactScrollViewHelper.emitLayoutChangeEvent(this);
|
||||
}
|
||||
|
||||
+1
-5
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<dd8221f4b150b4b3bec3dafd4b745482>>
|
||||
* @generated SignedSource<<74209bb4a44619a1ce16d68cfeeb0653>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -1466,10 +1466,6 @@ class ReactNestedScrollView extends NestedScrollView
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaintainVisibleContentPositionHelper != null) {
|
||||
mMaintainVisibleContentPositionHelper.updateScrollPosition();
|
||||
}
|
||||
|
||||
if (isShown() && isContentReady()) {
|
||||
int currentScrollY = getScrollY();
|
||||
int maxScrollY = getMaxScrollY();
|
||||
|
||||
-4
@@ -1458,10 +1458,6 @@ public class ReactScrollView extends ScrollView
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaintainVisibleContentPositionHelper != null) {
|
||||
mMaintainVisibleContentPositionHelper.updateScrollPosition();
|
||||
}
|
||||
|
||||
if (isShown() && isContentReady()) {
|
||||
int currentScrollY = getScrollY();
|
||||
int maxScrollY = getMaxScrollY();
|
||||
|
||||
Reference in new issue
Block a user