When moving A/A1 to the root of the gallery, I think pwg.categories.move and pwg.categories.setRank are called in parallel. That's a problem because setRank relies on the current list of albums in the same parent album. The JS code must wait for the response of pwg.categories.move before calling pwg.categories.setRank.
Currently, it generates a random result. If you have luck you will think it's fine, but another time you get an inverted rank at page reload...
When moving A/A1 to the root of the gallery, I think `pwg.categories.move` and `pwg.categories.setRank` are called in parallel. That's a problem because `setRank` relies on the current list of albums in the same parent album. The JS code must wait for the response of `pwg.categories.move` before calling `pwg.categories.setRank`.
Currently, it generates a random result. If you have luck you will think it's fine, but another time you get an inverted rank at page reload...
<!-- github-sync-id:802346658 -->
In any case it would be related: when you reorder an album to the first rank (at the root), pwg.categories.move is called, even if the parent does not change.
In any case it would be related: when you reorder an album to the first rank (at the root), `pwg.categories.move` is called, even if the parent does not change.
<!-- github-comment-id:774187223 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When moving A/A1 to the root of the gallery, I think
pwg.categories.moveandpwg.categories.setRankare called in parallel. That's a problem becausesetRankrelies on the current list of albums in the same parent album. The JS code must wait for the response ofpwg.categories.movebefore callingpwg.categories.setRank.Currently, it generates a random result. If you have luck you will think it's fine, but another time you get an inverted rank at page reload...
In any case it would be related: when you reorder an album to the first rank (at the root),
pwg.categories.moveis called, even if the parent does not change.