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:
1 parent
5fdd336139
commit
c92a59b0ae
3 files changed
+288
-17
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user