NY-9849: [AN]: IndexOutOfBoundsException in ChatLinearLayoutManager recycler fix
Created by: rvc-brickabode
From our internal process of review:
This problem is caused by RecyclerView Data modified in different threads. The best way is checking all data access. And a workaround is wrapping LinearLayoutManager and use a try-catch-finally block as shown below.
Another alternative is to override supportsPredictiveItemAnimations method and returns false. However, we don't want to negatively impact animations the application might have.
These are the two approaches the community is using to avoid this issue.