Recyclerview not updating cached indextip and fastscroller sections when using adapter with diffutil (e.g. ListAdapter, PagingDataAdapter) on dynamic data source #11
Cached sections only gets updated on onChange which requires calling notifyDataSetChanged(). But these adapters never or seldom calls notifyDataSetChanged() on changes to underlying data but onItemRangeChanged() , onItemRangeRemoved() and onItemRangeInserted(). To force it to update, notifyDataSetChanged() needs to be manually invoked every after submitData/submitList but this negates the efficiency benefits of diffutil.
This also causes indextip and fastscroll thumbs label to not show initially unless seslSetIndexTipEnabled(true) and seslSetFastScrollerEnabled(true) are called after submitData/submitList.
Cached sections only gets updated on
onChange
which requires callingnotifyDataSetChanged()
. But these adapters never or seldom callsnotifyDataSetChanged()
on changes to underlying data butonItemRangeChanged()
,onItemRangeRemoved()
andonItemRangeInserted()
. To force it to update,notifyDataSetChanged()
needs to be manually invoked every after submitData/submitList but this negates the efficiency benefits of diffutil.This also causes indextip and fastscroll thumbs label to not show initially unless seslSetIndexTipEnabled(true) and seslSetFastScrollerEnabled(true) are called after submitData/submitList.