mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Allow long-press on workspace immediately after dropping.
Previously the touch was consumed until the transition from spring-loaded to normal workspace finished, leading long presses to trigger on the background rather than on apps. This made it difficult to move multiple icons consecutively. Bug: 29631912 Change-Id: I259e618c81f56bc40d08a5d63ddbbf3c82a76baf
This commit is contained in:
@@ -1160,7 +1160,7 @@ public class Workspace extends PagedView
|
||||
}
|
||||
|
||||
private boolean shouldConsumeTouch(View v) {
|
||||
return (workspaceInModalState() || !isFinishedSwitchingState())
|
||||
return !workspaceIconsCanBeDragged()
|
||||
|| (!workspaceInModalState() && indexOfChild(v) != mCurrentPage);
|
||||
}
|
||||
|
||||
@@ -1826,6 +1826,11 @@ public class Workspace extends PagedView
|
||||
return mState != State.NORMAL;
|
||||
}
|
||||
|
||||
/** Returns whether a drag should be allowed to be started from the current workspace state. */
|
||||
public boolean workspaceIconsCanBeDragged() {
|
||||
return mState == State.NORMAL || mState == State.SPRING_LOADED;
|
||||
}
|
||||
|
||||
@Thunk void updateChildrenLayersEnabled(boolean force) {
|
||||
boolean small = mState == State.OVERVIEW || mIsSwitchingState;
|
||||
boolean enableChildrenLayers = force || small || mAnimatingViewIntoPlace || isPageInTransition();
|
||||
|
||||
Reference in New Issue
Block a user