[Modify]1.4.0bug修复
This commit is contained in:
@@ -110,6 +110,7 @@ import com.yizhuan.xchat_android_core.user.bean.BaseInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.xchat_android_core.utils.CurrentTimeUtils
|
||||
import com.yizhuan.xchat_android_core.utils.net.VipLevelNotEnoughException
|
||||
import com.yizhuan.xchat_android_library.common.util.SPUtils
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.utils.RxNetWorkUtils
|
||||
import com.yizhuan.xchat_android_library.rxbus.RxBus
|
||||
import com.yizhuan.xchat_android_library.utils.*
|
||||
@@ -1209,6 +1210,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
roomFreeGiftDialog = RoomFreeGiftDialog(context, it)
|
||||
roomFreeGiftDialog?.show()
|
||||
SPUtils.putBoolean(Constants.IS_SHOW_FREE_GIFT, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -12,12 +12,12 @@ class GoldRecordAdapter :
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: HallMemberGoldFlowInfo) {
|
||||
helper.setText(R.id.tv_user_name, item.nick ?: "--")
|
||||
.setText(R.id.tv_have_exchange, item.exchangeGolds.toString())
|
||||
.setText(R.id.tv_have_exchange, item.giftGolds.toString())
|
||||
.setText(R.id.tv_settlement, item.remainGolds.toString())
|
||||
.setText(R.id.tv_diamond_pay_record, FormatUtils.formatToShortDown(item.giftDiamonds))
|
||||
.setText(
|
||||
R.id.tv_have_change,
|
||||
mContext.getString(R.string.have_converted, item.giftGolds.toString())
|
||||
mContext.getString(R.string.have_converted, item.exchangeGolds.toString())
|
||||
)
|
||||
.setText(R.id.tv_pos, (helper.layoutPosition+1).toString())
|
||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_user_avatar), item.avatar)
|
||||
|
@@ -126,4 +126,6 @@ public class Constants {
|
||||
|
||||
public static final String PHONE_LOGIN = "phone_login";
|
||||
|
||||
public static final String IS_SHOW_FREE_GIFT = "is_show_free_gift";
|
||||
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMessage;
|
||||
import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.base.BaseModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
@@ -54,6 +55,7 @@ import com.yizhuan.xchat_android_core.utils.net.RadishNotEnoughException;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_core.utils.net.VipLevelNotEnoughException;
|
||||
import com.yizhuan.xchat_android_core.vip.UserVipInfo;
|
||||
import com.yizhuan.xchat_android_library.common.util.SPUtils;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
@@ -649,6 +651,9 @@ public class GiftModel extends BaseModel implements IGiftModel {
|
||||
|
||||
private void startFreeGiftCountDown(int giftId) {
|
||||
cancelCountDownTimer();
|
||||
if(!SPUtils.getBoolean(Constants.IS_SHOW_FREE_GIFT,false) && giftFreeInfo.getCurStage() > 0){
|
||||
EventBus.getDefault().post(new RoomFreeGiftEvent(giftFreeInfo));
|
||||
}
|
||||
if (giftFreeInfo.getCurStage() < giftFreeInfo.getMaxStage()) {
|
||||
if (giftFreeInfo.getCurStageSecond() > 0) {
|
||||
countDownTimer = new CountDownTimer(giftFreeInfo.getCurStageSecond() * 1000, 1000) {
|
||||
@@ -661,6 +666,7 @@ public class GiftModel extends BaseModel implements IGiftModel {
|
||||
public void onFinish() {
|
||||
EventBus.getDefault().post(new UpdateKnapFreeGiftNumEvent(giftId, false));
|
||||
if (giftFreeInfo.getCurStage() == 0) {
|
||||
SPUtils.putBoolean(Constants.IS_SHOW_FREE_GIFT,false);
|
||||
EventBus.getDefault().post(new RoomFreeGiftEvent(giftFreeInfo));
|
||||
}
|
||||
Logger.info(TAG, "FREE_GIFT onTimerFinish");
|
||||
|
Reference in New Issue
Block a user