Fix incorrect state of ElasticScroll.

This commit is contained in:
John Preston 2023-07-24 10:43:45 +04:00
parent 079d966e45
commit ad852f0f4a

View file

@ -903,8 +903,10 @@ void ElasticScroll::updateState() {
const auto delta = std::max( const auto delta = std::max(
std::min(nowOverscroll - wasOverscroll, from), std::min(nowOverscroll - wasOverscroll, from),
0); 0);
from -= delta; if (delta) {
till -= delta; applyScrollTo(from - delta);
return;
}
} }
setState({ setState({
.visibleFrom = from, .visibleFrom = from,