| 36 | } |
| 37 | |
| 38 | componentDidMount() { |
| 39 | this.state.progress.addListener(event => { |
| 40 | this.progressValue = event.value; |
| 41 | }); |
| 42 | this.state.rotation.addListener(event => { |
| 43 | this.rotationValue = event.value; |
| 44 | }); |
| 45 | if (this.props.indeterminate) { |
| 46 | this.spin(); |
| 47 | if (indeterminateProgress) { |
| 48 | Animated.spring(this.state.progress, { |
| 49 | toValue: indeterminateProgress, |
| 50 | useNativeDriver: false |
| 51 | }).start(); |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | componentDidUpdate(prevProps) { |
| 57 | if (prevProps.indeterminate !== this.props.indeterminate) { |