|
@@ -32,7 +32,8 @@ export default class AutoHideComponent extends React.Component<Props, State> {
|
32
|
32
|
}
|
33
|
33
|
|
34
|
34
|
onScroll({nativeEvent}: Object) {
|
35
|
|
- const speed = this.lastOffset - nativeEvent.contentOffset.y;
|
|
35
|
+ const speed = nativeEvent.contentOffset.y < 0 ? 0 : this.lastOffset - nativeEvent.contentOffset.y;
|
|
36
|
+ console.log(nativeEvent);
|
36
|
37
|
if (speed < -5) { // Go down
|
37
|
38
|
if (!this.isAnimationDownPlaying) {
|
38
|
39
|
this.isAnimationDownPlaying = true;
|