修改直播间聊天删除问题
This commit is contained in:
parent
b3083cdd18
commit
13146595bf
@ -10,9 +10,9 @@ ext {
|
||||
manifestPlaceholders = [
|
||||
//正式
|
||||
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
//
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//腾讯地图
|
||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||
|
@ -463,9 +463,12 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
mList.remove(bean.getHeart());
|
||||
notifyItemRemoved(bean.getHeart());
|
||||
notifyItemRangeChanged(bean.getHeart(), getItemCount());
|
||||
|
||||
}
|
||||
|
||||
public void scrollToBottom() {
|
||||
|
@ -884,49 +884,49 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mChatRecyclerView.setLayoutManager(layoutManager);
|
||||
mChatRecyclerView.addItemDecoration(new TopGradual());
|
||||
mChatRecyclerView.setItemViewCacheSize(10);
|
||||
mChatRecyclerView.setItemAnimator(new SimpleItemAnimator() {
|
||||
@Override
|
||||
public boolean animateRemove(RecyclerView.ViewHolder holder) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean animateAdd(RecyclerView.ViewHolder holder) {
|
||||
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.live_chat_msg_in);
|
||||
holder.itemView.startAnimation(animation);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean animateMove(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromLeft, int fromTop, int toLeft, int toTop) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runPendingAnimations() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endAnimation(@NonNull RecyclerView.ViewHolder item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endAnimations() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
// mChatRecyclerView.setItemAnimator(new SimpleItemAnimator() {
|
||||
// @Override
|
||||
// public boolean animateRemove(RecyclerView.ViewHolder holder) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean animateAdd(RecyclerView.ViewHolder holder) {
|
||||
// Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.live_chat_msg_in);
|
||||
// holder.itemView.startAnimation(animation);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean animateMove(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromLeft, int fromTop, int toLeft, int toTop) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void runPendingAnimations() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void endAnimation(@NonNull RecyclerView.ViewHolder item) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void endAnimations() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isRunning() {
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
mLiveChatAdapter = new LiveChatAdapter(mContext);
|
||||
mChatRecyclerView.setAdapter(mLiveChatAdapter);
|
||||
mLiveChatAdapter.setOnItemClickListener(new OnItemClickListener<LiveChatBean>() {
|
||||
|
Loading…
Reference in New Issue
Block a user