Fix overscroll modification.

This commit is contained in:
John Preston 2023-07-20 21:36:39 +04:00
parent 0f20eb152a
commit 288bec7157

View file

@ -1170,7 +1170,7 @@ void ElasticScroll::setOverscrollTypes(
if (fromChanged) { if (fromChanged) {
switch (_overscrollTypeFrom) { switch (_overscrollTypeFrom) {
case OverscrollType::None: case OverscrollType::None:
_overscroll = 0; _overscroll = _overscrollAccumulated = 0;
applyScrollTo(0); applyScrollTo(0);
break; break;
case OverscrollType::Virtual: case OverscrollType::Virtual:
@ -1185,7 +1185,7 @@ void ElasticScroll::setOverscrollTypes(
- (_state.visibleTill - _state.visibleFrom); - (_state.visibleTill - _state.visibleFrom);
switch (_overscrollTypeTill) { switch (_overscrollTypeTill) {
case OverscrollType::None: case OverscrollType::None:
_overscroll = 0; _overscroll = _overscrollAccumulated = 0;
applyScrollTo(max); applyScrollTo(max);
break; break;
case OverscrollType::Virtual: case OverscrollType::Virtual: