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

Commit 3e6500ca authored by Raj Yengisetty's avatar Raj Yengisetty
Browse files

Delay reloading Dynamic grid after size change till onResume or settings panel collapses

Change-Id: I1077921d8c59172d63a8fc5fb287ff26a38e3e93
parent ca7fbbb1
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -1166,8 +1166,6 @@ public class Launcher extends Activity
        }
        super.onResume();

        updateGridIfNeeded();

        // Restore the previous launcher state
        if (mOnResumeState == State.WORKSPACE) {
            showWorkspace(false);
@@ -1281,6 +1279,8 @@ public class Launcher extends Activity
        } else {
            mHiddenFolderAuth = false;
        }

        updateGridIfNeeded();
    }

    @Override
@@ -1405,10 +1405,14 @@ public class Launcher extends Activity
    }

    public void setDynamicGridSize(DeviceProfile.GridSize size) {
        int gridSize = SettingsProvider.getIntCustomDefault(this,
                SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, 0);
        if (gridSize != size.getValue()) {
            SettingsProvider.putInt(this,
                    SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, size.getValue());

        updateDynamicGrid();
            setUpdateDynamicGrid();
        }

        mOverviewSettingsPanel.notifyDataSetInvalidated();