diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 8ee8974e4..17c3656d7 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -349,7 +349,8 @@ public class LiveChatAdapter extends RecyclerView.Adapter { } } - public synchronized void insertItem(LiveChatBean bean) { + @SuppressLint("NotifyDataSetChanged") + public void insertItem(LiveChatBean bean) { if (bean == null) { return; @@ -373,7 +374,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { mPosition = size; } } - notifyItemChanged(getItemCount() - 1); + notifyDataSetChanged(); } diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 916aaa0eb..0cb734178 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -290,7 +290,7 @@ @@ -298,7 +298,7 @@