Skip to content
Open
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
5 changes: 2 additions & 3 deletions src/components/carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,9 @@ class Carousel extends Component<CarouselProps, CarouselState> {
// finished full page scroll
const {currentStandingPage, currentPage} = this.state;
const pagesCount = presenter.getChildrenLength(this.props);

if (currentPage < pagesCount) {
this.setState({currentStandingPage: currentPage});

if (currentStandingPage !== currentPage) {
this.props.onChangePage?.(currentPage, currentStandingPage, {isAutoScrolled: this.isAutoScrolled});
this.isAutoScrolled = false;
Expand Down Expand Up @@ -511,7 +510,7 @@ class Carousel extends Component<CarouselProps, CarouselState> {
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
decelerationRate="fast"
scrollEventThrottle={200}
scrollEventThrottle={Constants.isAndroid ? 16 : 200} // Android needs 16ms throttle to reliably catch loop boundary during fast swipes (Ticket 4885)
{...others}
ref={this.carousel}
onScroll={animatedScrollOffset ? this.onScrollEvent : this.onScroll}
Expand Down