thoughtbot / expandable-recycler-view

Custom Android RecyclerViewAdapters that collapse and expand
https://robots.thoughtbot.com/introducing-expandablerecyclerview
MIT License
2.12k stars 407 forks source link

Collapse stops working #159

Closed Corical closed 6 years ago

Corical commented 6 years ago

I've noticed this when having 1 child item, spam tapping the parent eventually results in having multiple mPendingUpdates and then it stops reacting to expand taps. In onItemRangeRemoved it then returns false for return mPendingUpdates.size() == 1;. I substituted BigNerdRanch's expandable recycler view because it is deprecated and suffered the same fate, instead crashed though. But now I realise the same thing in here.

I'm using com.thoughtbot:expandablerecyclerview:1.3 with a very vanilla implementation, similar to the sample, even just setting title in bind, was doing a bit more but reverted to just that to make sure I'm not causing any undesired effects.

Corical commented 6 years ago

Issue seems to be not calling notifyDataSetChanged() from runOnUiThread when changes were made.