Skip to content

Commit 6e9d868

Browse files
authored
Merge pull request #134 from esensar/fix/129-widget-placing-issue
Prevent widgets overlap with items from other pages
2 parents 222cca2 + 8b6a6fd commit 6e9d868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
366366
val viewX = widgetView.x.toInt()
367367
val viewY = widgetView.y.toInt()
368368
val frameRect = Rect(viewX, viewY, viewX + widgetView.width, viewY + widgetView.height)
369-
val otherGridItems = gridItems.filter { it.widgetId != item.widgetId }.toMutableList() as ArrayList<HomeScreenGridItem>
369+
val otherGridItems = gridItems.filterVisibleOnCurrentPageOnly().filter { it.widgetId != item.widgetId }.toMutableList() as ArrayList<HomeScreenGridItem>
370370
binding.resizeFrame.updateFrameCoords(frameRect, cellWidth, cellHeight, sideMargins, item, otherGridItems)
371371
binding.resizeFrame.beVisible()
372372
binding.resizeFrame.z = 1f // make sure the frame isnt behind the widget itself

0 commit comments

Comments
 (0)