diff options
| author | 2024-10-24 17:01:51 +0000 | |
|---|---|---|
| committer | 2024-10-24 17:01:51 +0000 | |
| commit | 0c6f881e25f47e93d9617341ba6cbd855c3e111f (patch) | |
| tree | 604c2149d8fe181520f726343ecf45a5e58ae306 | |
| parent | 375073f535a690570a8e1d27375ff452f918f7a0 (diff) | |
| parent | ff1ea8f8f6f89c9ee577bf311c4feb3a16bcb2e0 (diff) | |
Merge "Update drag-drop collision detection" into main
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt index 5feb63df0bca..1551ca97a2e3 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt @@ -182,7 +182,8 @@ internal constructor( val itemBoundingBox = IntRect(item.offset, item.size) draggingItemKey != item.key && contentListState.isItemEditable(item.index) && - draggingBoundingBox.contains(itemBoundingBox.center) + (draggingBoundingBox.contains(itemBoundingBox.center) || + itemBoundingBox.contains(draggingBoundingBox.center)) } } else { state.layoutInfo.visibleItemsInfo |