diff --git a/common/src/main/java/com/yunbao/common/views/weight/CircleProgress2.java b/common/src/main/java/com/yunbao/common/views/weight/CircleProgress2.java index b64ec8433..879aae686 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/CircleProgress2.java +++ b/common/src/main/java/com/yunbao/common/views/weight/CircleProgress2.java @@ -12,9 +12,9 @@ import android.view.View; public class CircleProgress2 extends View { private Paint mPaint; private RectF mRectF; - private int mCurrent = 1, mMax = 100; + private int mCurrent = 10, mMax = 100; //圆弧(也可以说是圆环)的宽度 - private float mArcWidth =9; + private float mArcWidth =7; //控件的宽度 private float mWidth; @@ -60,7 +60,7 @@ public class CircleProgress2 extends View { //大圆的半径 float bigCircleRadius = mWidth / 2; //小圆的半径 - float smallCircleRadius = bigCircleRadius - mArcWidth; + float smallCircleRadius = bigCircleRadius; //绘制小圆 canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint); mPaint.setColor(Color.parseColor("#FEC51B")); diff --git a/config.gradle b/config.gradle index f0bd50618..8bd78b4b7 100644 --- a/config.gradle +++ b/config.gradle @@ -5,7 +5,7 @@ ext { minSdkVersion : 21, targetSdkVersion : 33, versionCode : 458, - versionName : "6.6.2" + versionName : "6.6.3" ] manifestPlaceholders = [ //正式、 diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 0ea9779d3..7645a0b10 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -332,9 +332,12 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { public void upDataQuickGift(int quickGiftRemainingQuantity, int ifViewingDurationComplete) { mQuickGiftRemainingQuantity = quickGiftRemainingQuantity; mIfViewingDurationComplete = ifViewingDurationComplete; - quickGiftContDown = 120; - circleProgress.setMax(120); - circleProgress.setCurrent(quickGiftContDown); + if (!(quickGiftContDown > 0 && quickGiftContDown < 120)) { + quickGiftContDown = 120; + circleProgress.setMax(120); + circleProgress.setCurrent(quickGiftContDown); + } + if (quickGiftRemainingQuantity > 0) { quick_gift_remaining_quantity.setVisibility(View.VISIBLE); quick_gift_remaining_quantity.setText(String.valueOf(quickGiftRemainingQuantity)); @@ -342,7 +345,9 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { quick_gift_remaining_quantity.setVisibility(View.GONE); } if (quickGiftRemainingQuantity < 10 && ifViewingDurationComplete > 0) { - quickGiftHandler.postDelayed(quickGiftRunnable, 1000); + if (!(quickGiftContDown > 0 && quickGiftContDown < 120)) { + quickGiftHandler.postDelayed(quickGiftRunnable, 1000); + } } } @@ -370,9 +375,10 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { LiveNetManager.get(mContext).viewingDurationGetGift(mLiveUid, new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(QuickGiftSendGiftModel data) { - if (data.getQuickGiftRemainingQuantity() < 10 && data.getIfViewingDurationComplete() > 0) { - upDataQuickGift(data.getQuickGiftRemainingQuantity(), data.getIfViewingDurationComplete()); - } + + upDataQuickGift(data.getQuickGiftRemainingQuantity(), data.getIfViewingDurationComplete()); + + } @Override @@ -390,6 +396,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { combo.setVisibility(View.GONE); lianSongHandler.removeCallbacks(lianSongRunnable); lianSongHandler.removeCallbacks(lianSongRunnable); + quickGiftHandler.removeCallbacks(quickGiftRunnable); } private boolean removeRunnable = false; @@ -415,9 +422,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { @Override public void onSuccess(QuickGiftSendGiftModel data) { upDataQuickGift(data.getQuickGiftRemainingQuantity(), data.getIfViewingDurationComplete()); - if (mQuickGiftRemainingQuantity < 10 && mIfViewingDurationComplete > 0) { - quickGiftHandler.postDelayed(quickGiftRunnable, 1000); - } if (data.getIfHiddenEgg() == 3) { ToastUtil.show(WordUtil.isNewZh() ? "恭喜您解鎖隱藏彩蛋! 獎勵已發放!" : "Congratulations on unlocking the hidden easter egg! Rewards have been distributed!"); } @@ -729,6 +733,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { super.release(); EventBus.getDefault().unregister(this); removeCallbacks(); + resetView(); } /** diff --git a/live/src/main/res/layout/view_live_audience.xml b/live/src/main/res/layout/view_live_audience.xml index 6d1c75ace..7e93889f9 100644 --- a/live/src/main/res/layout/view_live_audience.xml +++ b/live/src/main/res/layout/view_live_audience.xml @@ -400,6 +400,7 @@