优化直播间聊天消息动画效果

This commit is contained in:
Yutousama 2022-12-19 15:32:09 +08:00
parent 2c6e88500a
commit cae0599307

View File

@ -390,7 +390,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
}
mList.add(bean);
if (isSlideToBottom(mRecyclerView) || mRecyclerViewScrolledDy == 0) {
scrollToBottom(mRecyclerView);
scrollToBottom();
} else {
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.NEW_MESSAGE_REMINDER));
@ -401,7 +401,11 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
mPosition = size;
}
}
if (getItemCount() == 1) {
notifyDataSetChanged();
} else {
notifyItemInserted(getItemCount());
}
}