Commit 51fc7958 authored by ToffeeLu's avatar ToffeeLu Committed by 偏右

fix header visible or hide in one `requestAnimationFrame`

parent b6267b5a
......@@ -99,12 +99,12 @@ class HeaderView extends PureComponent {
visible: true,
});
}
if (scrollTop > 300 && visible) {
else if (scrollTop > 300 && visible) {
this.setState({
visible: false,
});
}
if (scrollTop < 300 && !visible) {
else if (scrollTop < 300 && !visible) {
this.setState({
visible: true,
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment