fix[声望升级-修复BUG]

This commit is contained in:
Martin 2024-06-01 10:16:31 +08:00
parent c4d378daba
commit 11c9a53028
2 changed files with 8 additions and 6 deletions

View File

@ -1668,7 +1668,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
case LEAVE_PK_SCORE: case LEAVE_PK_SCORE:
if (mLiveSwLinkMicPkPresenter != null) { if (mLiveSwLinkMicPkPresenter != null) {
mLiveSwLinkMicPkPresenter.closeButtonGone(); mLiveSwLinkMicPkPresenter.closeButtonGone();
mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime()); mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime(),true);
} }
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.seisShowGif(true); mLiveRoomViewHolder.seisShowGif(true);

View File

@ -79,8 +79,10 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
@ -563,7 +565,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
} }
} }
pkScores.remove(removeUid); pkScores.remove(removeUid);
upDataPkScore(pkScores,"-1",0); upDataPkScore(pkScores,"-1",0,false);
} }
}, 1000); }, 1000);
} }
@ -588,7 +590,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
if (livePushSwViewHolder != null) { if (livePushSwViewHolder != null) {
livePushSwViewHolder.setAnDrPkRtc(String.valueOf(u.getId()), -1); 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(); msg1.create();
String targetId = "g" + CommonAppConfig.getInstance().getUid(); 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()))) { 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(); msg1.create();
L.eSw("發送給自己直播間" + drPkbeans.get(i).getId()); L.eSw("發送給自己直播間" + drPkbeans.get(i).getId());
String targetId = "g" + CommonAppConfig.getInstance().getUid(); String targetId = "g" + CommonAppConfig.getInstance().getUid();
@ -1699,14 +1701,14 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
/** /**
* 更新Pk分数 * 更新Pk分数
*/ */
public void upDataPkScore(JSONArray pkScores, String uid, int time) { public void upDataPkScore(JSONArray pkScores, String uid, int time,boolean isShowTimeTitle) {
this.pkScores = pkScores; this.pkScores = pkScores;
L.eSw("更新Pk分数 upDataPkScore time:" + time + " " + pkScores); L.eSw("更新Pk分数 upDataPkScore time:" + time + " " + pkScores);
String userID1 = (String) imageGrade1.getTag(); String userID1 = (String) imageGrade1.getTag();
String userID2 = (String) imageGrade2.getTag(); String userID2 = (String) imageGrade2.getTag();
String userID4 = (String) imageGrade4.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); mHandler.removeMessages(WHAT_PK_TIME2);
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) livePushSwViewHolder.timeTitle.getLayoutParams(); RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) livePushSwViewHolder.timeTitle.getLayoutParams();
layoutParams.topMargin = DpUtil.dp2px(123); layoutParams.topMargin = DpUtil.dp2px(123);