mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Highlight work tab when user already in All Apps after creating WP.
When a user created a work profile and was already in the All Apps view, the work tab was not highlighted, because the logic for that was only in AllAppsContainerView#onScrollUpEnd(). This CL highlights the tab when the user has resumed and the All Apps view is expanded. Bug: 79242814 Test: Manual Change-Id: I40af0d513c95f8084e21f4e276e9f56bcb06555e
This commit is contained in:
@@ -249,11 +249,21 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
if (Float.compare(mProgress, 1f) == 0) {
|
||||
mAppsView.setVisibility(View.INVISIBLE);
|
||||
mAppsView.reset(false /* animate */);
|
||||
} else if (Float.compare(mProgress, 0f) == 0) {
|
||||
} else if (isAllAppsExpanded()) {
|
||||
mAppsView.setVisibility(View.VISIBLE);
|
||||
mAppsView.onScrollUpEnd();
|
||||
} else {
|
||||
mAppsView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isAllAppsExpanded() {
|
||||
return Float.compare(mProgress, 0f) == 0;
|
||||
}
|
||||
|
||||
public void highlightWorkTabIfNecessary() {
|
||||
if (isAllAppsExpanded()) {
|
||||
mAppsView.highlightWorkTabIfNecessary();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user