From 71b4deced1c5389c160da27f897fa37b78e21ff4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 5 Oct 2022 10:09:36 +0200 Subject: [PATCH] replacing some Untils with dots --- .../launcher/views/HomeScreenGrid.kt | 12 ++++++------ .../launcher/views/MyAppWidgetResizeFrame.kt | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt index 9858bec..9c70b12 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt @@ -237,8 +237,8 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel var areAllCellsEmpty = true val wantedCell = Pair(xIndex, yIndex) gridItems.forEach { item -> - for (xCell in item.left until item.right) { - for (yCell in item.top until item.bottom) { + for (xCell in item.left .. item.right) { + for (yCell in item.top .. item.bottom) { val cell = Pair(xCell, yCell) val isAnyCellOccupied = wantedCell == cell if (isAnyCellOccupied) { @@ -311,16 +311,16 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel if (gridCells != null) { val widgetRect = getWidgetOccupiedRect(gridCells) val widgetTargetCells = ArrayList>() - for (xCell in widgetRect.left until widgetRect.right) { - for (yCell in widgetRect.top until widgetRect.bottom) { + for (xCell in widgetRect.left .. widgetRect.right) { + for (yCell in widgetRect.top .. widgetRect.bottom) { widgetTargetCells.add(Pair(xCell, yCell)) } } var areAllCellsEmpty = true gridItems.filter { it.id != draggedItem?.id }.forEach { item -> - for (xCell in item.left until item.right) { - for (yCell in item.top until item.bottom) { + for (xCell in item.left .. item.right) { + for (yCell in item.top .. item.bottom) { val cell = Pair(xCell, yCell) val isAnyCellOccupied = widgetTargetCells.contains(cell) if (isAnyCellOccupied) { diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/views/MyAppWidgetResizeFrame.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/views/MyAppWidgetResizeFrame.kt index d481cf1..b55ddf5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/views/MyAppWidgetResizeFrame.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/views/MyAppWidgetResizeFrame.kt @@ -82,8 +82,8 @@ class MyAppWidgetResizeFrame(context: Context, attrs: AttributeSet, defStyle: In occupiedCells.clear() allGridItems.forEach { item -> - for (xCell in item.left until item.right) { - for (yCell in item.top until item.bottom) { + for (xCell in item.left..item.right) { + for (yCell in item.top..item.bottom) { occupiedCells.add(Pair(xCell, yCell)) } }