Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.2.1
Devices/Android versions reproduced on: Android Emulator (multiple versions)
We have a project where we use the RecyclerView with the AsyncListDiffer and the ItemTouchHelper.
We noticed that when the user tries to move an item, the OnMove function on the ItemTouchHelper gets called multiple times instead of just once per moving by one item up or down.
It seems the ItemTouchHelper OnMove expects that the RecyclerView must contain the updated list when the function returns. This is just isn't possible by using the AsyncListDiffer, because that will only update the list later, on another thread asynchronously.
Unfortunately it isn't easy to extend both ItemTouchHelper and AsyncListDiffer with new functionality.
One solution would be if ItemTouchHelper OnMove would accept a callback when the update of the list was done, and AsyncListDiffer would call it when the diff finishes.
Other solution would be if we could provide a new list to AsyncListDiffer without initiating the diffing.
(More details can be found in our original PR where we tried to investigate and fix the problem: