Skip to content

Commit

Permalink
Remove onScrollAnimationEnd
Browse files Browse the repository at this point in the history
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes #15156

Differential Revision: D5479265

Pulled By: shergin

fbshipit-source-id: a2dfa3a4357e126838a17dac4797d1d845cd56ae
  • Loading branch information
tomasreimers authored and facebook-github-bot committed Jul 24, 2017
1 parent b8118d1 commit aa9a19a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@ const ScrollView = createReactClass({
* events can be controlled using the `scrollEventThrottle` prop.
*/
onScroll: PropTypes.func,
/**
* Called when a scrolling animation ends.
* @platform ios
*/
onScrollAnimationEnd: PropTypes.func,
/**
* Called when scrollable content view of the ScrollView changes.
*
Expand Down
1 change: 0 additions & 1 deletion React/Views/RCTScrollView.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
@property (nonatomic, copy) RCTDirectEventBlock onScrollEndDrag;
@property (nonatomic, copy) RCTDirectEventBlock onMomentumScrollBegin;
@property (nonatomic, copy) RCTDirectEventBlock onMomentumScrollEnd;
@property (nonatomic, copy) RCTDirectEventBlock onScrollAnimationEnd;

@end

Expand Down
2 changes: 1 addition & 1 deletion React/Views/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
[self scrollViewDidScroll:scrollView];

// Fire the end deceleration event
RCT_SEND_SCROLL_EVENT(onMomentumScrollEnd, nil); //TODO: shouldn't this be onScrollAnimationEnd?
RCT_SEND_SCROLL_EVENT(onMomentumScrollEnd, nil);
RCT_FORWARD_SCROLL_EVENT(scrollViewDidEndScrollingAnimation:scrollView);
}

Expand Down
1 change: 0 additions & 1 deletion React/Views/RCTScrollViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(onScrollEndDrag, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollBegin, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollEnd, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onScrollAnimationEnd, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(DEPRECATED_sendUpdatedChildFrames, BOOL)

// overflow is used both in css-layout as well as by react-native. In css-layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ public static Map createExportedCustomDirectEventTypeConstants() {
.put(ScrollEventType.SCROLL.getJSEventName(), MapBuilder.of("registrationName", "onScroll"))
.put(ScrollEventType.BEGIN_DRAG.getJSEventName(), MapBuilder.of("registrationName", "onScrollBeginDrag"))
.put(ScrollEventType.END_DRAG.getJSEventName(), MapBuilder.of("registrationName", "onScrollEndDrag"))
.put(ScrollEventType.ANIMATION_END.getJSEventName(), MapBuilder.of("registrationName", "onScrollAnimationEnd"))
.put(ScrollEventType.MOMENTUM_BEGIN.getJSEventName(), MapBuilder.of("registrationName", "onMomentumScrollBegin"))
.put(ScrollEventType.MOMENTUM_END.getJSEventName(), MapBuilder.of("registrationName", "onMomentumScrollEnd"))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public enum ScrollEventType {
END_DRAG("topScrollEndDrag"),
SCROLL("topScroll"),
MOMENTUM_BEGIN("topMomentumScrollBegin"),
MOMENTUM_END("topMomentumScrollEnd"),
ANIMATION_END("topScrollAnimationEnd");
MOMENTUM_END("topMomentumScrollEnd");

private final String mJSEventName;

Expand Down

0 comments on commit aa9a19a

Please sign in to comment.