OpenLauncherTeam / openlauncher

Customizable and Open Source Launcher for Android
Apache License 2.0
1.41k stars 413 forks source link

Fix bug where '_location' is not properly updated introduced with https://github.com/OpenLauncherTeam/openlauncher/pull/552 #556

Closed cmtjk closed 4 years ago

cmtjk commented 4 years ago

Rational

There's a small bug introduced with https://github.com/OpenLauncherTeam/openlauncher/pull/552, where the _location is not properly updated after disbanding a group resulting in disappearing icons.

Reproduce without this PR

  1. Create group with two items (both items have _location = ItemPosition.Group
  2. Remove one item from the group so group gets disbanded
    • removed item has _location = ItemPosition.Desktop
    • last item of group still has _location = ItemPosition.Group despite it's now a common icon
  3. Redraw/Restart desktop
    • last item disappeared
gsantner commented 4 years ago

thanks!

hey you can also create one combined PR and list all kind of fixes (instead 5 small PRs :D )

dkanada commented 4 years ago

I actually prefer the smaller PRs o.o haha

cmtjk commented 4 years ago

thanks!

hey you can also create one combined PR and list all kind of fixes (instead 5 small PRs :D )

@gsantner Personally I prefer smaller PRs (PR per functionality/fix), since they are easier to revert if they introduce new bugs. Otherwise you would have to manually separate the faulty code from the rest of the PR till a adequate fix is found. Sorry for the notification/email spam ;)

gsantner commented 4 years ago

as you wish