mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Merge "Delay showing task bar until the user releases their finger dragging from all apps to normal"
This commit is contained in:
@@ -74,6 +74,8 @@ import java.util.function.Supplier;
|
||||
private boolean mIsAnimatingToLauncherViaGesture;
|
||||
private boolean mIsAnimatingToLauncherViaResume;
|
||||
|
||||
private boolean mShouldDelayLauncherStateAnim;
|
||||
|
||||
private final StateManager.StateListener<LauncherState> mStateListener =
|
||||
new StateManager.StateListener<LauncherState>() {
|
||||
|
||||
@@ -86,7 +88,9 @@ import java.util.function.Supplier;
|
||||
mLauncherState = toState;
|
||||
}
|
||||
updateStateForFlag(FLAG_TRANSITION_STATE_RUNNING, true);
|
||||
applyState();
|
||||
if (!mShouldDelayLauncherStateAnim) {
|
||||
applyState();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,6 +163,15 @@ import java.util.function.Supplier;
|
||||
return mIsAnimatingToLauncherViaResume || mIsAnimatingToLauncherViaGesture;
|
||||
}
|
||||
|
||||
public void setShouldDelayLauncherStateAnim(boolean shouldDelayLauncherStateAnim) {
|
||||
if (!shouldDelayLauncherStateAnim && mShouldDelayLauncherStateAnim) {
|
||||
// Animate the animation we have delayed immediately. This is usually triggered when
|
||||
// the user has released their finger.
|
||||
applyState();
|
||||
}
|
||||
mShouldDelayLauncherStateAnim = shouldDelayLauncherStateAnim;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the proper flag to change the state of the task bar.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user