Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {