diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index b9e1fe394..78c9dbf64 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -1668,7 +1668,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl case LEAVE_PK_SCORE: if (mLiveSwLinkMicPkPresenter != null) { mLiveSwLinkMicPkPresenter.closeButtonGone(); - mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime()); + mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime(),true); } if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.seisShowGif(true); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java index 427d5384e..10b4c19fe 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java @@ -79,8 +79,10 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Timer; import java.util.TimerTask; @@ -563,7 +565,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener { } } pkScores.remove(removeUid); - upDataPkScore(pkScores,"-1",0); + upDataPkScore(pkScores,"-1",0,false); } }, 1000); } @@ -588,7 +590,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener { if (livePushSwViewHolder != null) { livePushSwViewHolder.setAnDrPkRtc(String.valueOf(u.getId()), -1); } - final SocketSendBean msg1 = new SocketSendBean().param("_method_", SOCKET_LIVE_DRPK).param("action", 3).param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()).param("pkuid", CommonAppConfig.getInstance().getUid()).param("type", 3).param("uid", u.getId()).param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()).param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); + final SocketSendBean msg1 = new SocketSendBean().param("_method_", SOCKET_LIVE_DRPK).param("action", 3).param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()).param("pkuid", CommonAppConfig.getInstance().getUid()).param("msgtype", 3).param("uid", u.getId()).param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()).param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); msg1.create(); String targetId = "g" + CommonAppConfig.getInstance().getUid(); @@ -1063,7 +1065,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener { } if (!CommonAppConfig.getInstance().getUid().equals(String.valueOf(drPkbeans.get(i).getId()))) { - final SocketSendBean msg1 = new SocketSendBean().param("_method_", SOCKET_LIVE_DRPK).param("action", 3).param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()).param("pkuid", CommonAppConfig.getInstance().getUid()).param("msgtype", 3).param("uid", drPkbeans.get(i).getId()).param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()).param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); + final SocketSendBean msg1 = new SocketSendBean().param("_method_", SOCKET_LIVE_DRPK).param("action", 3).param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()).param("msgtype", 3).param("uid", drPkbeans.get(i).getId()).param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()).param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName() );; msg1.create(); L.eSw("發送給自己直播間" + drPkbeans.get(i).getId()); String targetId = "g" + CommonAppConfig.getInstance().getUid(); @@ -1699,14 +1701,14 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener { /** * 更新Pk分数 */ - public void upDataPkScore(JSONArray pkScores, String uid, int time) { + public void upDataPkScore(JSONArray pkScores, String uid, int time,boolean isShowTimeTitle) { this.pkScores = pkScores; L.eSw("更新Pk分数 upDataPkScore time:" + time + " " + pkScores); String userID1 = (String) imageGrade1.getTag(); String userID2 = (String) imageGrade2.getTag(); String userID4 = (String) imageGrade4.getTag(); - if (livePushSwViewHolder.timeTitle.getVisibility() == View.GONE &&!"-1".equals(uid)) { + if (livePushSwViewHolder.timeTitle.getVisibility() == View.GONE &&isShowTimeTitle) { mHandler.removeMessages(WHAT_PK_TIME2); RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) livePushSwViewHolder.timeTitle.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(123);