While debugging Section.update() due to ANR, I noticed that DiffUtil is running on the main thread.
Is this intentional or a bug? If the former, I'd suggest to document that.
On it!
This is in 2.2.0-alpha1 right now.
Note that if you use GroupAdapter.updateAsync(), all of your previous methods of sending updates will not work. Because async updates require updating the entire list every time, we can't risk conflicts from individual Groups or Items updating. It's updateAsync and updateAsync only if you go that route!
I plan on updating the example with a more full example of how you can use payloads, dispatch changes, etc in a structure like Arch Components / ViewModel to get the same effects while updating async. It won't be as effortless but it's more in sync (lol) with the modern way of doing things.
I realized I only addressed updating the whole adapter async, not a Section. The idea of updating a single Group asynchronously is really tricky because it introduces potential race conditions and inconsistencies. (Say you add items to your first and second group. Depending on when the diff lands for the first group, either your position lookups or your change notifications could be wrong for the second group.) You don't have to cause this yourself either; something like an ExpandableGroup could trigger it. So I'm inclined not to let people do it.
Most helpful comment
On it!