Skip to content

Introduce differential app icon loading

Georges Basile Stavracas Neto requested to merge gbsneto/icon-grid-part1 into master

Right now, the app icon grid is loaded and updated in a fairly rudimentary way; every app installation change (be it an app being installed or removed) performs:

  1. A full cleanup of the app icons (removes all icons and icon grid actors)
  2. A full reload of the app icons
  3. Recreate the icon actors

In order to be able to introduce Drag n' Drop in the icon grid, and show the animations that make it a sane experience, this approach doesn't work. Removing all icon actors kills any chance we have to animate them.

This merge request introduces differential app icon loading. What does that mean? When an app installantion change is triggered, we now perform the following steps:

  1. Get the new list of icons
  2. Calculate the diff between the current icons and new ones:
    1. Remove the icons that were removed (i.e. icons present in the current list, but not in the updated list)
    2. Add the new icons (i.e. icons present in the updated list, but not in the current list)
  3. Create the icon actors (only for the new icons)

That allows us to keep the icon actors around, and in the future, animate them.

Merge request reports