修改bug

This commit is contained in:
18401019693
2023-11-11 14:17:16 +08:00
parent 6990bd13ed
commit eb5aebda51
14 changed files with 347 additions and 317 deletions

View File

@@ -44,7 +44,6 @@ public class SudGameActivity extends AbsActivity {
private CreateSudRoomModel mCreateSudRoomModel;
private TextView gameTitle, roomName, roomNumber;
private RoundedImageView mAvatar;
@Override
protected int getLayoutId() {
return R.layout.activity_sud_game;
@@ -164,9 +163,9 @@ public class SudGameActivity extends AbsActivity {
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
} else {
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("金豆不够 ");
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Insufficient money ");
ToastUtil.show("Shortage of money");
}
}
@@ -175,9 +174,9 @@ public class SudGameActivity extends AbsActivity {
@Override
public void onError(String error) {
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("金豆不够 ");
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Insufficient money ");
ToastUtil.show("Shortage of money");
}
}
});

View File

@@ -8,6 +8,17 @@ public class CheckRemainingBalance extends BaseModel {
private int goldenBeanRemainingBalance;
@SerializedName("status")
private int status;
@SerializedName("deduct_money_key")
private String deductMoneyKey;
public String getDeductMoneyKey() {
return deductMoneyKey;
}
public CheckRemainingBalance setDeductMoneyKey(String deductMoneyKey) {
this.deductMoneyKey = deductMoneyKey;
return this;
}
public int getStatus() {
return status;

View File

@@ -154,7 +154,7 @@ public class CreateSudGamePopup extends BottomPopupView {
String sill = gameSill.getText().toString();
String name = roomName.getText().toString();
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
if (name.length() > 10) {
if (name.length() > 15) {
ToastUtil.show("房間名长度为[1-10]");
return;
}

View File

@@ -100,7 +100,7 @@ public class SudGameListPopup extends BottomPopupView {
for (CustomSidebarChildModel model : customSidebarChildModels) {
if (TextUtils.equals(String.valueOf(interactionID), model.getSrc())) {
gameTitle.setText(model.getTitle().substring(0, 2));
gameTitle.setText(model.getTitle());
id = model.getId();
}
}
@@ -294,13 +294,13 @@ public class SudGameListPopup extends BottomPopupView {
public void onSudGameListEvent(SudGameListEvent event) {
interactionID = event.getInteractionID();
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
gameTitle.setText(event.getTitle().substring(0, 2));
gameTitle.setText(event.getTitle());
} else {
if (event.getTitle().contains("All")) {
gameTitle.setText("All");
} else {
if ((event.getTitle().length() > 6)) {
gameTitle.setText(event.getTitle().substring(0, 5));
gameTitle.setText(event.getTitle());
} else {
gameTitle.setText(event.getTitle());
}

View File

@@ -94,7 +94,7 @@ public class SudFSTAPPDecorator {
if (iSudFSTAPP != null) {
SudMGPAPPState.APPCommonSelfPlaying state = new SudMGPAPPState.APPCommonSelfPlaying();
state.isPlaying = isPlaying;
// state.reportGameInfoExtras = reportGameInfoExtras;
// state.reportGameInfoExtras = deductMoneyKey;
// state.reportGameInfoKey = reportGameInfoKey;
iSudFSTAPP.notifyStateChange(SudMGPAPPState.APP_COMMON_SELF_PLAYING, SudJsonUtils.toJson(state), null);
}

View File

@@ -51,7 +51,7 @@ public class LiveSudGamePopup extends BottomPopupView {
private CreateSudRoomModel mCreateSudRoomModel;
private TextView gameTitle, roomName, roomNumber;
private RoundedImageView mAvatar;
private boolean selfClick = false;
public LiveSudGamePopup(@NonNull Context context, long interactionID, String liveUid) {
super(context);
@@ -167,7 +167,9 @@ public class LiveSudGamePopup extends BottomPopupView {
// SudMGP平台64bit游戏ID
gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID);
}
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
private void initDate() {
LiveNetManager.get(getContext())
.getCustomSidebarInfo("1", new HttpCallback<List<CustomSidebarInfoModel>>() {
@@ -223,9 +225,9 @@ public class LiveSudGamePopup extends BottomPopupView {
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
} else {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("金豆不够 ");
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Insufficient money ");
ToastUtil.show("Shortage of money");
}
}
@@ -234,9 +236,9 @@ public class LiveSudGamePopup extends BottomPopupView {
@Override
public void onError(String error) {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("金豆不够 ");
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Insufficient money ");
ToastUtil.show("Shortage of money");
}
}
});
@@ -250,9 +252,10 @@ public class LiveSudGamePopup extends BottomPopupView {
HttpCallback<CheckRemainingBalance>() {
@Override
public void onSuccess(CheckRemainingBalance data) {
if (data.getStatus()==1){
if (data.getStatus() == 1) {
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfPlaying(true);
}else {
} else {
}
@@ -265,7 +268,7 @@ public class LiveSudGamePopup extends BottomPopupView {
});
break;
case SudMGPMGState.MG_COMMON_GAME_STATE:
LiveNetManager.get(getContext()).deductMoney( mCreateSudRoomModel.getSudGameRoomId());
LiveNetManager.get(getContext()).deductMoney(mCreateSudRoomModel.getSudGameRoomId());
break;
}