Skip to content

Commit

Permalink
Remove redundant return value from ReactScrollViewHelper (#38752)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #38752

changelog: [internal]

The return value is not used, let's remove it.

Reviewed By: ryancat

Differential Revision: D47916485

fbshipit-source-id: 1275b6146f8d3abe624991ed8e76abb5ac99984b
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Sep 11, 2023
1 parent db4a253 commit 2a48c95
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,15 @@ int getNextFlingStartValue(
}

public static <T extends ViewGroup & HasStateWrapper & HasScrollState & HasFlingAnimator>
boolean updateFabricScrollState(final T scrollView) {
return updateFabricScrollState(scrollView, scrollView.getScrollX(), scrollView.getScrollY());
void updateFabricScrollState(final T scrollView) {
updateFabricScrollState(scrollView, scrollView.getScrollX(), scrollView.getScrollY());
}

/**
* Called on any stabilized onScroll change to propagate content offset value to a Shadow Node.
*/
public static <T extends ViewGroup & HasStateWrapper & HasScrollState & HasFlingAnimator>
boolean updateFabricScrollState(final T scrollView, final int scrollX, final int scrollY) {
void updateFabricScrollState(final T scrollView, final int scrollX, final int scrollY) {
if (DEBUG_MODE) {
FLog.i(
TAG,
Expand All @@ -413,18 +413,18 @@ boolean updateFabricScrollState(final T scrollView, final int scrollX, final int
}

if (ViewUtil.getUIManagerType(scrollView.getId()) == UIManagerType.DEFAULT) {
return false;
return;
}

final ReactScrollViewScrollState scrollState = scrollView.getReactScrollViewScrollState();
// Dedupe events to reduce JNI traffic
if (scrollState.getLastStateUpdateScroll().equals(scrollX, scrollY)) {
return false;
return;
}

scrollState.setLastStateUpdateScroll(scrollX, scrollY);
forceUpdateState(scrollView);
return true;
return;
}

public static <T extends ViewGroup & HasScrollState & HasStateWrapper & HasFlingAnimator>
Expand Down

0 comments on commit 2a48c95

Please sign in to comment.