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

Commit 664c1c18 authored by Alex Chau's avatar Alex Chau
Browse files

Sort hotseat items in migration to preserve position

Fix: 231601760
Test: manual with local backup/restore
Change-Id: Ie89f0134485296c3cd252cf6b86bb3f88a0f90de
parent 6183c4dd
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -216,14 +216,15 @@ public class GridSizeMigrationTaskV2 {
            return false;
        }

        // Sort the items by the reading order.
        Collections.sort(mHotseatDiff);
        Collections.sort(mWorkspaceDiff);

        // Migrate hotseat
        HotseatPlacementSolution hotseatSolution = new HotseatPlacementSolution(mDb, mSrcReader,
                mDestReader, mContext, mDestHotseatSize, mHotseatItems, mHotseatDiff);
        hotseatSolution.find();

        // Sort the items by the reading order.
        Collections.sort(mWorkspaceDiff);

        // Migrate workspace.
        // First we create a collection of the screens
        List<Integer> screens = new ArrayList<>();