Skip to content

Commit

Permalink
Remove scrollWithoutAnimationTo from ScrollView
Browse files Browse the repository at this point in the history
Summary: This function was deprecated in Dec 2016. It has no callsites at FB and should be deleted.

Reviewed By: zackargyle, ejanzer

Differential Revision: D17180174

fbshipit-source-id: de3ab78c469220b629ef7f6773d60507959f6db6
  • Loading branch information
elicwhite authored and facebook-github-bot committed Sep 18, 2019
1 parent 54b645d commit c7e8990
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
13 changes: 0 additions & 13 deletions Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,19 +480,6 @@ const ScrollResponderMixin = {
);
},

/**
* Deprecated, do not use.
*/
scrollResponderScrollWithoutAnimationTo: function(
offsetX: number,
offsetY: number,
) {
console.warn(
'`scrollResponderScrollWithoutAnimationTo` is deprecated. Use `scrollResponderScrollTo` instead',
);
this.scrollResponderScrollTo({x: offsetX, y: offsetY, animated: false});
},

/**
* A helper function to zoom to a specific rect in the scrollview. The argument has the shape
* {x: number; y: number; width: number; height: number; animated: boolean = true}
Expand Down
14 changes: 0 additions & 14 deletions Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ export type ScrollResponderType = {

setNativeProps: $PropertyType<ScrollView, 'setNativeProps'>,
scrollTo: $PropertyType<ScrollView, 'scrollTo'>,
scrollWithoutAnimationTo: $PropertyType<
ScrollView,
'scrollWithoutAnimationTo',
>,
flashScrollIndicators: $PropertyType<ScrollView, 'flashScrollIndicators'>,

...typeof ScrollResponder.Mixin,
Expand Down Expand Up @@ -840,16 +836,6 @@ class ScrollView extends React.Component<Props, State> {
});
}

/**
* Deprecated, use `scrollTo` instead.
*/
scrollWithoutAnimationTo(y: number = 0, x: number = 0) {
console.warn(
'`scrollWithoutAnimationTo` is deprecated. Use `scrollTo` instead',
);
this.scrollTo({x, y, animated: false});
}

/**
* Displays the scroll indicators momentarily.
*
Expand Down

0 comments on commit c7e8990

Please sign in to comment.