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

Commit 51ae00f3 authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge "Prevent tiles from being selectable when dragging" into main

parents daea33e6 dfe4d4b8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1032,7 +1032,9 @@ private fun LazyGridItemScope.TileGridCell(
        // usually happens when resizing a tile multiple times. We can fix this by applying the
        // draggable modifier after the first frame
        var isSelectable by remember { mutableStateOf(false) }
        LaunchedEffect(canLayoutTile) { isSelectable = canLayoutTile }
        LaunchedEffect(canLayoutTile, dragAndDropState.dragInProgress) {
            isSelectable = canLayoutTile && !dragAndDropState.dragInProgress
        }
        val selectableModifier =
            Modifier.selectableTile(cell.tile.tileSpec, selectionState)
                .dragAndDropTileSource(