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

Commit 10323732 authored by TheScarastic's avatar TheScarastic
Browse files

fix(reorder) : Fix icons not rearranding properly

parent b6342fc2
Loading
Loading
Loading
Loading
Loading
Compare 1d7c8aae to 291cbef9
Original line number Original line Diff line number Diff line
Subproject commit 1d7c8aae3e714f15de84d92965367cfc8f938087
Subproject commit 291cbef9885c05283985c05c58797108d3f93b5d
+8 −2
Original line number Original line Diff line number Diff line
@@ -2494,6 +2494,7 @@ public class CellLayout extends ViewGroup {
            if (c.cellX == x && c.cellY == y) {
            if (c.cellX == x && c.cellY == y) {
                mTmpOccupied.markCells(c, false);
                mTmpOccupied.markCells(c, false);
                views.add(keyValue.getKey());
                views.add(keyValue.getKey());
                pushIconByRow(c, mCountX, mCountY, ViewCluster.LEFT);
            }
            }
        }
        }


@@ -2532,7 +2533,12 @@ public class CellLayout extends ViewGroup {
        solution.spanY = 1;
        solution.spanY = 1;
        solution.isSolution = true;
        solution.isSolution = true;


        if (views.get(0) != null) {
        for (View v: cluster.views) {
            CellAndSpan c = solution.map.get(v);
            mTmpOccupied.markCells(c, true);
        }

        if (views.size() > 0 && views.get(0) != null) {
            performReorder(solution, views.get(0), MODE_ON_DROP);
            performReorder(solution, views.get(0), MODE_ON_DROP);
        }
        }
    }
    }
@@ -2660,7 +2666,7 @@ public class CellLayout extends ViewGroup {
            if (!DESTRUCTIVE_REORDER
            if (!DESTRUCTIVE_REORDER
                    && (mode == MODE_ON_DROP || mode == MODE_ON_DROP_EXTERNAL)) {
                    && (mode == MODE_ON_DROP || mode == MODE_ON_DROP_EXTERNAL)) {
                // Since the temp solution didn't update dragView, don't commit it either
                // Since the temp solution didn't update dragView, don't commit it either
                commitTempPlacement(dragView);
                commitTempPlacement(null);
                completeAndClearReorderPreviewAnimations();
                completeAndClearReorderPreviewAnimations();
                setItemPlacementDirty(false);
                setItemPlacementDirty(false);
            } else {
            } else {