mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Load folder names during LoaderTask
Bug: 147359653 Change-Id: I4d1b53c3a72d0773d4bc8819ee8118fc719944ad
This commit is contained in:
@@ -1673,7 +1673,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
}
|
||||
|
||||
boolean createUserFolderIfNecessary(View newView, int container, CellLayout target,
|
||||
int[] targetCell, float distance, boolean external, DragView dragView) {
|
||||
int[] targetCell, float distance, boolean external, DragObject d) {
|
||||
if (distance > mMaxDistanceForFolderCreation) return false;
|
||||
View v = target.getChildAt(targetCell[0], targetCell[1]);
|
||||
|
||||
@@ -1711,14 +1711,13 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
sourceInfo.cellY = -1;
|
||||
|
||||
// If the dragView is null, we can't animate
|
||||
boolean animate = dragView != null;
|
||||
boolean animate = d != null;
|
||||
if (animate) {
|
||||
// In order to keep everything continuous, we hand off the currently rendered
|
||||
// folder background to the newly created icon. This preserves animation state.
|
||||
fi.setFolderBackground(mFolderCreateBg);
|
||||
mFolderCreateBg = new PreviewBackground();
|
||||
fi.performCreateAnimation(destInfo, v, sourceInfo, dragView, folderLocation, scale
|
||||
);
|
||||
fi.performCreateAnimation(destInfo, v, sourceInfo, d, folderLocation, scale);
|
||||
} else {
|
||||
fi.prepareCreateAnimation(v);
|
||||
fi.addItem(destInfo);
|
||||
@@ -1799,8 +1798,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
// If the item being dropped is a shortcut and the nearest drop
|
||||
// cell also contains a shortcut, then create a folder with the two shortcuts.
|
||||
if (createUserFolderIfNecessary(cell, container,
|
||||
dropTargetLayout, mTargetCell, distance, false, d.dragView) ||
|
||||
addToExistingFolderIfNecessary(cell, dropTargetLayout, mTargetCell,
|
||||
dropTargetLayout, mTargetCell, distance, false, d)
|
||||
|| addToExistingFolderIfNecessary(cell, dropTargetLayout, mTargetCell,
|
||||
distance, d, false)) {
|
||||
mLauncher.getStateManager().goToState(NORMAL, SPRING_LOADED_EXIT_DELAY);
|
||||
return;
|
||||
@@ -2561,7 +2560,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
|
||||
mDragViewVisualCenter[1], mTargetCell);
|
||||
if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance,
|
||||
true, d.dragView)) {
|
||||
true, d)) {
|
||||
return;
|
||||
}
|
||||
if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d,
|
||||
|
||||
Reference in New Issue
Block a user