mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Don't scroll to home card if overview isn't visible
Consider these steps: - Swipe up for recents - Scroll over several cards - Swipe up for all apps - Press home Before this change, there was a delay as recents scrolled back to the workspace card before going home, even though it wasn't visible. Change-Id: I1c0edc8e02d1d1d236f47882695903e33e6b09ae
This commit is contained in:
@@ -83,7 +83,8 @@ public class RecentsViewStateController implements StateHandler {
|
||||
|
||||
// Scroll to the workspace card before changing to the NORMAL state.
|
||||
int currPage = mRecentsView.getCurrentPage();
|
||||
if (toState == NORMAL && currPage != 0 && !config.userControlled) {
|
||||
LauncherState fromState = mLauncher.getStateManager().getState();
|
||||
if (fromState.overviewUi && toState == NORMAL && currPage != 0 && !config.userControlled) {
|
||||
int maxSnapDuration = PagedView.SLOW_PAGE_SNAP_ANIMATION_DURATION;
|
||||
int durationPerPage = maxSnapDuration / 10;
|
||||
int snapDuration = Math.min(maxSnapDuration, durationPerPage * currPage);
|
||||
|
||||
Reference in New Issue
Block a user