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

Commit dfe4d4b8 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Prevent tiles from being selectable when dragging

While a tile is being dragged, other tiles should not be selectable (to
resize).

Test: manual
Fixes: 428948980
Flag: EXEMPT bugfix
Change-Id: I762805b3e8f02a289db871d9093e86d60f69fc62
parent a1f819a3
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(