diff --git a/config.gradle b/config.gradle index b123cc49e..7bd22a5fb 100644 --- a/config.gradle +++ b/config.gradle @@ -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", 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 ac142a8e4..ea7b6c472 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -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() { diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 720e608c2..cf87b203e 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -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() {