mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-02-18 04:20:36 +01:00
ignore collisions with the dragged widget itself
This commit is contained in:
parent
65d13c31b1
commit
d98e3a9ddc
@ -248,7 +248,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||||||
}
|
}
|
||||||
|
|
||||||
var areAllCellsEmpty = true
|
var areAllCellsEmpty = true
|
||||||
gridItems.forEach { item ->
|
gridItems.filter { it.id != draggedItem?.id }.forEach { item ->
|
||||||
for (xCell in item.left until item.right) {
|
for (xCell in item.left until item.right) {
|
||||||
for (yCell in item.top until item.bottom) {
|
for (yCell in item.top until item.bottom) {
|
||||||
val cell = Pair(xCell, yCell)
|
val cell = Pair(xCell, yCell)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user