From 68f984029d029e7a83c2db67bbcdff2641b1b559 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 1 Feb 2019 14:04:21 -0800 Subject: [PATCH] remove scroll finish callback --- App/Containers/OnboardingScreen/index.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/App/Containers/OnboardingScreen/index.tsx b/App/Containers/OnboardingScreen/index.tsx index ca89a1485..da4cd598f 100644 --- a/App/Containers/OnboardingScreen/index.tsx +++ b/App/Containers/OnboardingScreen/index.tsx @@ -79,18 +79,15 @@ class OnboardingScreen extends React.Component { this.setState({blockNext: true}) this.pages.scrollToPage(this.state.currentPage + 1) setTimeout(() => { - this.setState({blockNext: false}) - }, 500) + this.setState({ + blockNext: false, + showArrow: this.showArrowForIndex(this.state.currentPage + 1), + currentPage: this.state.currentPage + 1 + }) + }, 350) } } - onScrollEnd = (index: number) => { - this.setState({ - showArrow: this.showArrowForIndex(index), - currentPage: index - }) - } - complete = () => { this.props.complete() this.props.navigation.navigate('StatusCheck') @@ -186,7 +183,6 @@ class OnboardingScreen extends React.Component { style={[CONTAINER]} containerStyle={{ marginBottom: MARGIN_SMALL }} indicatorColor={COLOR_BRAND_PINK} - onScrollEnd={this.onScrollEnd} startPage={this.state.currentPage} scrollEnabled={false} >