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

Commit 8579541a authored by Yash Garg's avatar Yash Garg 💬 Committed by Sahil Sonar
Browse files

fix(cell): icons not rearranging properly



[SahilSonar - adapted to A14]

Signed-off-by: default avatarSahilSonar <sss.sonar2003@gmail.com>
parent 8b5b051f
Loading
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1651,6 +1651,7 @@ public class CellLayout extends ViewGroup {
            if (c.cellX == x && c.cellY == y) {
                mTmpOccupied.markCells(c, false);
                views.add(keyValue.getKey());
                pushIconByRow(c, mCountX, mCountY, ViewCluster.LEFT);
            }
        }
        ViewCluster cluster = new ViewCluster(this, views, solution);
@@ -1687,7 +1688,12 @@ public class CellLayout extends ViewGroup {
        solution.spanY = 1;
        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);
        }
    }
@@ -1855,7 +1861,7 @@ public class CellLayout extends ViewGroup {
            if (!DESTRUCTIVE_REORDER
                    && (mode == MODE_ON_DROP || mode == MODE_ON_DROP_EXTERNAL)) {
                // Since the temp solution didn't update dragView, don't commit it either
                commitTempPlacement(dragView);
                commitTempPlacement(null);
                completeAndClearReorderPreviewAnimations();
                setItemPlacementDirty(false);
            } else {