Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1681,8 +1681,6 @@ public void onLayoutChange(
// 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>>
*/

/**
Expand Down Expand Up @@ -1466,10 +1466,6 @@ public void onLayoutChange(
return;
}

if (mMaintainVisibleContentPositionHelper != null) {
mMaintainVisibleContentPositionHelper.updateScrollPosition();
}

if (isShown() && isContentReady()) {
int currentScrollY = getScrollY();
int maxScrollY = getMaxScrollY();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1458,10 +1458,6 @@ public void onLayoutChange(
return;
}

if (mMaintainVisibleContentPositionHelper != null) {
mMaintainVisibleContentPositionHelper.updateScrollPosition();
}

if (isShown() && isContentReady()) {
int currentScrollY = getScrollY();
int maxScrollY = getMaxScrollY();
Expand Down
Loading