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

Commit 885e7a02 authored by Olivier St-Onge's avatar Olivier St-Onge
Browse files

Fix drop zone for edit tiles

The entire edit mode container is now receiving the drop events for removal

Test: manually dragging tiles
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Fixes: 394749073
Change-Id: Ie46119c77f5a416bf48106c4a19033720c283498
parent f57800bc
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -246,16 +246,14 @@ fun DefaultEditTileGrid(
                        // the top bar
                        .padding(top = innerPadding.calculateTopPadding())
                        .clipScrollableContainer(Orientation.Vertical)
                        .verticalScroll(scrollState),
                        .verticalScroll(scrollState)
                        .dragAndDropRemoveZone(listState, onRemoveTile),
            ) {
                AnimatedContent(
                    targetState = listState.dragInProgress || selectionState.selected,
                    label = "QSEditHeader",
                ) { showRemoveTarget ->
                    EditGridHeader(
                        Modifier.dragAndDropRemoveZone(listState, onRemoveTile)
                            .padding(bottom = 26.dp)
                    ) {
                    EditGridHeader(Modifier.padding(bottom = 26.dp)) {
                        if (showRemoveTarget) {
                            RemoveTileTarget {
                                selectionState.selection?.let {
@@ -284,7 +282,6 @@ fun DefaultEditTileGrid(
                    Modifier.fillMaxWidth()
                        .requiredHeightIn(AvailableTilesGridMinHeight)
                        .animateContentSize()
                        .dragAndDropRemoveZone(listState, onRemoveTile)
                ) {
                    // Using the fully qualified name here as a workaround for AnimatedVisibility
                    // not being available from a Box