Open Yuanarcheannovice opened 2 years ago
修复会话列表 删除A会话后,再长按A会话下面其他的会话,下标异常导致闪退或者弹框位置错误
@Override public void onItemRemoved(int position) { int itemIndex = getItemIndexInAdapter(position); notifyItemRemoved(itemIndex); //保证会话下标正常 notifyItemRangeChanged(itemIndex,mDataSource.size()-position); } @Override public void onItemInserted(int position) { int itemIndex = getItemIndexInAdapter(position); notifyItemInserted(itemIndex); //保证会话下标正常 notifyItemRangeChanged(itemIndex,mDataSource.size()-position); }
修复会话列表 删除A会话后,再长按A会话下面其他的会话,下标异常导致闪退或者弹框位置错误