修复:修复主播关播数据不展示问题

This commit is contained in:
18401019693 2022-12-14 17:08:09 +08:00
parent 606fc64262
commit ee2cebdc41
3 changed files with 39 additions and 18 deletions

View File

@ -10,9 +10,9 @@ ext {
manifestPlaceholders = [ 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", txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -858,6 +858,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveEndViewHolder.subscribeActivityLifeCycle(); mLiveEndViewHolder.subscribeActivityLifeCycle();
mLiveEndViewHolder.addToParent(); mLiveEndViewHolder.addToParent();
mLiveEndViewHolder.showData(mLiveBean, mStream); mLiveEndViewHolder.showData(mLiveBean, mStream);
mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")));
} }
if (mLiveAnchorViewHolder != null) { if (mLiveAnchorViewHolder != null) {
mLiveAnchorViewHolder.release(); mLiveAnchorViewHolder.release();
@ -979,27 +980,27 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override @Override
protected void onPause() { protected void onPause() {
if (mLiveRoomViewHolder != null) { // if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.anchorPause(); // mLiveRoomViewHolder.anchorPause();
} // }
super.onPause(); super.onPause();
if (isKeyBack) { // if (isKeyBack) {
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave)); // sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
} // }
mPaused = true; // mPaused = true;
} }
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
if (mPaused) { // if (mPaused) {
if (mLiveRoomViewHolder != null) { // if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.anchorResume(); // mLiveRoomViewHolder.anchorResume();
} // }
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back)); // sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
CommonHttpUtil.checkTokenInvalid(); // CommonHttpUtil.checkTokenInvalid();
} // }
mPaused = false; // mPaused = false;
} }

View File

@ -220,6 +220,26 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
} }
} }
public void upData(String votes, String length, long nums) {
Log.e("", votes + "votes" + length + "length" + nums + "nums");
if (type == LiveOfType.USER) {
if (liveDurationUser != null) {
liveDurationUser.setText(length);
}
} else {
if (liveDurationAnchor != null) {
liveDurationAnchor.setText(length);
}
if (liveVotes != null) {
liveVotes.setText(votes);
}
if (liveWatchNum != null) {
liveWatchNum.setText(StringUtil.toWan(nums));
}
}
}
public void showData(LiveBean liveBean, final String stream) { public void showData(LiveBean liveBean, final String stream) {
if (TextUtils.equals(model.getId() + "", liveBean.getUid())) { if (TextUtils.equals(model.getId() + "", liveBean.getUid())) {
type = LiveOfType.ANCHOR; type = LiveOfType.ANCHOR;
@ -331,7 +351,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
if (liveBean == null) { if (liveBean == null) {
return; return;
} }
if(MicStatusManager.getInstance().isMic(liveUid)){ if (MicStatusManager.getInstance().isMic(liveUid)) {
MicStatusManager.getInstance().showDownMicDialog(mContext); MicStatusManager.getInstance().showDownMicDialog(mContext);
return; return;
} }