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:
Pieter De Baets authored and meta-codesync[bot] committed 2026-04-21 11:03:19 -07:00
1 parent dbd3255194
commit 90017b5fd2
4 files changed
+1 -19

No files matched your search

@@ -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
@@ -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);
}
@@ -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();
@@ -1458,10 +1458,6 @@ public class ReactScrollView extends ScrollView
return;
}
if (mMaintainVisibleContentPositionHelper != null) {
mMaintainVisibleContentPositionHelper.updateScrollPosition();
}
if (isShown() && isContentReady()) {
int currentScrollY = getScrollY();
int maxScrollY = getMaxScrollY();