mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Refactoring ItemInfo
> Changing dragObject to ItemInfo > Removing dropPos which is always null > Removing requiresDbUpdate which is only used in CellLayout Change-Id: I753ddaae0880c8a9bfee5a1266095ff34610284a
This commit is contained in:
@@ -46,20 +46,20 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
setDrawable(R.drawable.ic_remove_launcher);
|
||||
}
|
||||
|
||||
public static boolean supportsDrop(Object info) {
|
||||
public static boolean supportsDrop(ItemInfo info) {
|
||||
return (info instanceof ShortcutInfo)
|
||||
|| (info instanceof LauncherAppWidgetInfo)
|
||||
|| (info instanceof FolderInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsDrop(DragSource source, Object info) {
|
||||
protected boolean supportsDrop(DragSource source, ItemInfo info) {
|
||||
return source.supportsDeleteDropTarget() && supportsDrop(info);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Thunk void completeDrop(DragObject d) {
|
||||
ItemInfo item = (ItemInfo) d.dragInfo;
|
||||
ItemInfo item = d.dragInfo;
|
||||
if ((d.dragSource instanceof Workspace) || (d.dragSource instanceof Folder)) {
|
||||
removeWorkspaceOrFolderItem(mLauncher, item, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user