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

Commit 10d9fc55 authored by Yash Garg's avatar Yash Garg 💬 Committed by Saalim Quadri
Browse files

fix(cell): icons not rearranging properly



[SahilSonar - adapted to A14]

Signed-off-by: default avatarSahilSonar <sss.sonar2003@gmail.com>
Signed-off-by: default avatarSaalim Quadri <danascape@gmail.com>
parent 904b766c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1630,6 +1630,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);
@@ -1666,7 +1667,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);
        }
    }
@@ -1834,7 +1840,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 {