Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88d70f2a authored by Tony's avatar Tony
Browse files

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
parent 85f1eed5
Loading
Loading
Loading
Loading

.gitignore

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
db_files
*.iml
.project
.classpath
.project.properties
gen/
tests/stress/gen/
WallpaperPicker/gen/
WallpaperPicker/.project.properties
bin/
.idea/
.gradle/
local.properties
gradle/
build/
gradlew*
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -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);