直播间聊天复用

This commit is contained in:
18401019693 2022-11-30 10:43:27 +08:00
parent 1b7296c13b
commit f5bd17f832

View File

@ -106,6 +106,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
@Override @Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) { public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) {
if (vh instanceof Vh) { if (vh instanceof Vh) {
vh.setIsRecyclable(false);
((Vh) vh).setData(mList.get(position), position); ((Vh) vh).setData(mList.get(position), position);
} else if (vh instanceof RedPackVh) { } else if (vh instanceof RedPackVh) {
((RedPackVh) vh).setData(mList.get(position)); ((RedPackVh) vh).setData(mList.get(position));