Skip to content
Snippets Groups Projects
Commit b2334c20 authored by Coco Duan's avatar Coco Duan Committed by Android (Google) Code Review
Browse files

Merge "Drag and drop a new widget should place it before CTA tile" into main

parents 645cc44c 3a46f95a
No related branches found
No related tags found
No related merge requests found
......@@ -161,9 +161,9 @@ internal class DragAndDropTargetState(
private var isOnRemoveButton = false
fun onStarted() {
// assume item will be added to the end.
contentListState.list.add(placeHolder)
// assume item will be added to the second to last position before CTA tile.
placeHolderIndex = contentListState.list.size - 1
placeHolderIndex?.let { contentListState.list.add(it, placeHolder) }
}
fun onMoved(event: DragAndDropEvent) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment