Fix #820, probably

This commit is contained in:
Grishka 2024-11-12 22:40:48 +03:00
parent ea1216b352
commit 6e4590caf2

View File

@ -651,6 +651,9 @@ public class UiUtils{
}
public static <T> void updateList(List<T> oldList, List<T> newList, RecyclerView list, RecyclerView.Adapter<?> adapter, BiPredicate<T, T> areItemsSame){
RecyclerView.ItemAnimator animator=list.getItemAnimator();
if(animator!=null)
animator.endAnimations();
// Save topmost item position and offset because for some reason RecyclerView would scroll the list to weird places when you insert items at the top
int topItem, topItemOffset;
if(list.getChildCount()==0){