DevAhamed / MultiViewAdapter

Easily create complex recyclerview adapters in android
https://devahamed.github.io/MultiViewAdapter
Apache License 2.0
818 stars 148 forks source link

IllegalStateException when loading items #117

Open AlonShahaf opened 4 years ago

AlonShahaf commented 4 years ago

I'm experiencing a crash when reloading my sections. In my setup we have 1xItemSection + 2xListSection, all using the same view item type. On binding, we hide all sections, and when we update the dataset we do the following:

  1. setItem on ItemSection (could be a null item)
  2. set on both ListSection
  3. show the section if they contain data.

We're also using DiffUtil for both list sections. The crash is happening on NestedSection.java #199 When we debug the section had data and itemPosition is usually 0.

Thanks in advance.