修改直播间聊天记录重叠问题
This commit is contained in:
parent
a1f07b8c20
commit
9fcc04cef2
@ -402,7 +402,8 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
// Log.i(TAG, "insertItem: " + bean.getContent()+" size = "+(mList.size()+1));
|
// Log.i(TAG, "insertItem: " + bean.getContent()+" size = "+(mList.size()+1));
|
||||||
int size = mList.size();
|
int size = mList.size();
|
||||||
//设置最大展示99条消息
|
//设置最大展示99条消息
|
||||||
if (size == 100) {
|
if (size >= 100 && (isBottom || mRecyclerViewScrolledDy == 0)) {
|
||||||
|
|
||||||
mList.subList(0, 50).clear();
|
mList.subList(0, 50).clear();
|
||||||
notifyItemRangeRemoved(0, 50);
|
notifyItemRangeRemoved(0, 50);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user