bugfix:修复糖果树购买糖果返回不刷新的问题
This commit is contained in:
@@ -118,11 +118,16 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
}
|
||||
});
|
||||
|
||||
loadKeyInfo();
|
||||
looperPrize();
|
||||
looperHintPrize();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
loadKeyInfo();
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void loadKeyInfo() {
|
||||
BoxModel.get()
|
||||
@@ -313,7 +318,6 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
.subscribe(roomEvent -> {
|
||||
switch (roomEvent.getEvent()) {
|
||||
case RoomEvent.WALLET_UPDATE:
|
||||
loadKeyInfo();
|
||||
setGold(roomEvent.getWalletInfo().getDiamondNum());
|
||||
break;
|
||||
case RoomEvent.KICK_OUT_ROOM:
|
||||
|
@@ -104,11 +104,16 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
mBinding.tvContinuousNum.setText("消耗" + num * 10);
|
||||
}
|
||||
});
|
||||
loadKeyInfo();
|
||||
looperPrize();
|
||||
looperHintPrize();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
loadKeyInfo();
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void loadKeyInfo() {
|
||||
BoxModel.get()
|
||||
@@ -289,7 +294,6 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
.subscribe(roomEvent -> {
|
||||
switch (roomEvent.getEvent()) {
|
||||
case RoomEvent.WALLET_UPDATE:
|
||||
loadKeyInfo();
|
||||
setGold(roomEvent.getWalletInfo().getDiamondNum());
|
||||
break;
|
||||
case RoomEvent.KICK_OUT_ROOM:
|
||||
|
@@ -119,12 +119,7 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
if (jsonObject == null) return;
|
||||
WalletInfo walletInfo = new WalletInfo();
|
||||
walletInfo.setUid(jsonObject.getLong("uid"));
|
||||
walletInfo.setDepositNum(jsonObject.getIntValue("depositNum"));
|
||||
walletInfo.setDiamondNum(jsonObject.getLong("diamonds"));
|
||||
walletInfo.setGoldNum(jsonObject.getIntValue("golds"));
|
||||
walletInfo.setCrystals(jsonObject.getDoubleValue("crystals"));
|
||||
walletInfo.nobleGoldNum = jsonObject.getDoubleValue("nobleGoldNum");
|
||||
walletInfo.chargeGoldNum = jsonObject.getDoubleValue("chargeGoldNum");
|
||||
walletInfo.setDiamondNum(jsonObject.getDoubleValue("diamonds"));
|
||||
this.walletInfo = walletInfo;
|
||||
// 兼容新版
|
||||
setWalletInfo(walletInfo);
|
||||
|
Reference in New Issue
Block a user