From ee2cebdc41c5231ba85b7034701f4324dbc68161 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 14 Dec 2022 17:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=BB=E6=92=AD=E5=85=B3=E6=92=AD=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 4 +-- .../live/activity/LiveRyAnchorActivity.java | 31 ++++++++++--------- .../yunbao/live/views/LiveEndViewHolder.java | 22 ++++++++++++- 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/config.gradle b/config.gradle index f139351ac..37ecbef9b 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/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 6e2cf06d3..d5fd2134e 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -858,6 +858,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveEndViewHolder.subscribeActivityLifeCycle(); mLiveEndViewHolder.addToParent(); mLiveEndViewHolder.showData(mLiveBean, mStream); + mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums"))); } if (mLiveAnchorViewHolder != null) { mLiveAnchorViewHolder.release(); @@ -979,27 +980,27 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl @Override protected void onPause() { - if (mLiveRoomViewHolder != null) { - mLiveRoomViewHolder.anchorPause(); - } +// if (mLiveRoomViewHolder != null) { +// mLiveRoomViewHolder.anchorPause(); +// } super.onPause(); - if (isKeyBack) { - sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave)); - } - mPaused = true; +// if (isKeyBack) { +// sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave)); +// } +// mPaused = true; } @Override protected void onResume() { super.onResume(); - if (mPaused) { - if (mLiveRoomViewHolder != null) { - mLiveRoomViewHolder.anchorResume(); - } - sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back)); - CommonHttpUtil.checkTokenInvalid(); - } - mPaused = false; +// if (mPaused) { +// if (mLiveRoomViewHolder != null) { +// mLiveRoomViewHolder.anchorResume(); +// } +// sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back)); +// CommonHttpUtil.checkTokenInvalid(); +// } +// mPaused = false; } diff --git a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java index 0ed15d730..c4a4c2b1d 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java @@ -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) { if (TextUtils.equals(model.getId() + "", liveBean.getUid())) { type = LiveOfType.ANCHOR; @@ -331,7 +351,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList if (liveBean == null) { return; } - if(MicStatusManager.getInstance().isMic(liveUid)){ + if (MicStatusManager.getInstance().isMic(liveUid)) { MicStatusManager.getInstance().showDownMicDialog(mContext); return; }