fix: infinite scroll wrap animation direction (#6653)

This commit fixes the infinite scroll wrap animation so it scrolls one page in the correct swipe direction instead of animating through all intermediate pages.
This commit is contained in:
wellorbetter authored and GitHub committed 2026-08-27 11:05:19 +00:00
1 parent 5fdd336139
commit c92a59b0ae
3 files changed
+288 -17

No files matched your search

+2 -1
View File
@@ -1507,7 +1507,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
public void showPageIndicatorAtCurrentScroll() {
if (mPageIndicator != null) {
mPageIndicator.setScroll(getScrollX(), computeMaxScroll());
// LC-Note: Use wrap-aware scroll for continuous infinite-scroll indicator animation.
mPageIndicator.setScroll(getScrollForPageIndicator(), computeMaxScroll());
var isHotseatEnabled = PreferenceCacheExtensionsKt.firstCached(mPreferenceManager2.isHotseatEnabled());
mPageIndicator.setVisibility(isHotseatEnabled ? VISIBLE : INVISIBLE);
}