小礼物逻辑第4次上传
This commit is contained in:
@@ -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<QuickGiftSendGiftModel>() {
|
||||
@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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -400,6 +400,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/pd_pao"
|
||||
android:layout_width="27dp"
|
||||
|
||||
android:layout_height="27dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
Reference in New Issue
Block a user