修复测试反馈内容
This commit is contained in:
parent
3d4ad99c99
commit
e8e0fc32f9
@ -21,6 +21,7 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.lxj.xpopup.core.BottomPopupView;
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
@ -416,6 +417,12 @@ public class CreateSudGamePopup extends BottomPopupView {
|
|||||||
id = event.getId();
|
id = event.getId();
|
||||||
gameSill.setEnabled(true);
|
gameSill.setEnabled(true);
|
||||||
gameSill.setText("");
|
gameSill.setText("");
|
||||||
|
LogUtils.e(id,currencyType);
|
||||||
|
if (!currencyModel.getActivityList().contains(id) && "4".equals(currencyType)) {
|
||||||
|
currencyType = "3";
|
||||||
|
currencyTypeName = WordUtil.getNewString(R.string.golden_bean);
|
||||||
|
selectCurrencyType.setText(currencyTypeName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
@ -251,6 +251,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
private void sortByWinNum(List<SudSettleBean> list) {
|
private void sortByWinNum(List<SudSettleBean> list) {
|
||||||
// 按照胜利数排序 settleBeans 列表
|
// 按照胜利数排序 settleBeans 列表
|
||||||
if (isActivityGame) {
|
if (isActivityGame) {
|
||||||
|
//TODO gameSettle.activityGameInfoBean为空 Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
|
||||||
for (SudActivityGameInfoBean infoBean : gameSettle.activityGameInfoBean) {
|
for (SudActivityGameInfoBean infoBean : gameSettle.activityGameInfoBean) {
|
||||||
for (SudSettleBean bean : list) {
|
for (SudSettleBean bean : list) {
|
||||||
if (bean.getUid().equals(infoBean.getUid() + "")) {
|
if (bean.getUid().equals(infoBean.getUid() + "")) {
|
||||||
|
@ -56,7 +56,6 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dismiss() {
|
public void dismiss() {
|
||||||
Bus.getOff(this);
|
|
||||||
super.dismiss();
|
super.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +77,6 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
Bus.getOn(this);
|
|
||||||
editSearch = findViewById(R.id.edit_search);
|
editSearch = findViewById(R.id.edit_search);
|
||||||
// listHistory = findViewById(R.id.list_history);
|
// listHistory = findViewById(R.id.list_history);
|
||||||
listRoom = findViewById(R.id.list_room);
|
listRoom = findViewById(R.id.list_room);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.event;
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
|
import com.yunbao.common.utils.DebugUtils;
|
||||||
|
|
||||||
public class LiveSudGamePopupShowOrHideEvent {
|
public class LiveSudGamePopupShowOrHideEvent {
|
||||||
private int type = 0;//0展示,1hide隱藏,2dismiss關閉
|
private int type = 0;//0展示,1hide隱藏,2dismiss關閉
|
||||||
|
@ -10,7 +10,9 @@ import android.text.TextUtils;
|
|||||||
import android.text.style.ImageSpan;
|
import android.text.style.ImageSpan;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.BallClearanceTableJoinRoomBean;
|
import com.yunbao.common.bean.BallClearanceTableJoinRoomBean;
|
||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.SudGameRoomInfoBean;
|
import com.yunbao.common.bean.SudGameRoomInfoBean;
|
||||||
@ -24,6 +26,7 @@ import com.yunbao.common.sud.QuickStartGameViewModel;
|
|||||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||||
import com.yunbao.common.utils.AppManager;
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@ -35,7 +38,7 @@ public class RandomSudGameManager {
|
|||||||
private AbsRandomGameManager gameManager;
|
private AbsRandomGameManager gameManager;
|
||||||
private CreateSudRoomModel sudRoomModel;
|
private CreateSudRoomModel sudRoomModel;
|
||||||
private QuickStartGameViewModel gameViewModel;
|
private QuickStartGameViewModel gameViewModel;
|
||||||
private boolean isRandom=false;
|
private boolean isRandom = false;
|
||||||
|
|
||||||
public static RandomSudGameManager getManager() {
|
public static RandomSudGameManager getManager() {
|
||||||
if (manager == null) {
|
if (manager == null) {
|
||||||
@ -134,7 +137,7 @@ public class RandomSudGameManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showNotActivityTicketDialog(Context mContext, boolean isAudience, DialogUitl.SimpleCallback2 simpleCallback) {
|
public void showNotActivityTicketDialog(Context mContext, boolean isAudience, DialogUitl.SimpleCallback2 simpleCallback) {
|
||||||
String text = WordUtil.isNewZh() ? "您的$不足,快去獲取門票吧~" : "Your$is not enough, go and get tickets~";
|
String text = WordUtil.isNewZh() ? "您還未用有門票$立即前往獲取吧~" : "You don’ thave a ticket yet$Go get it now~";
|
||||||
SpannableString ss = new SpannableString(text);
|
SpannableString ss = new SpannableString(text);
|
||||||
ImageSpan image = new ImageSpan(mContext, R.mipmap.ic_game_ticket);
|
ImageSpan image = new ImageSpan(mContext, R.mipmap.ic_game_ticket);
|
||||||
ss.setSpan(image, text.indexOf("$"), text.indexOf("$") + 1, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
|
ss.setSpan(image, text.indexOf("$"), text.indexOf("$") + 1, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
|
||||||
@ -144,7 +147,12 @@ public class RandomSudGameManager {
|
|||||||
.setShowConfirmButton(true)
|
.setShowConfirmButton(true)
|
||||||
.setShowCancelButton(true);
|
.setShowCancelButton(true);
|
||||||
if (isAudience) {
|
if (isAudience) {
|
||||||
builder.setCancelString(WordUtil.isNewZh() ? "僅觀戰" : "Watch the game");
|
builder.setConfirmString(WordUtil.isNewZh() ? "僅觀戰" : "Watch the game");
|
||||||
|
builder.setCancelString(WordUtil.isNewZh() ? "獲取" : "Obtain");
|
||||||
|
text = WordUtil.isNewZh() ? "您還未擁有門票$是否前往獲取?" : "You don’ t have the tickets yet $ Do you want to get them?";
|
||||||
|
ss = new SpannableString(text);
|
||||||
|
ss.setSpan(image, text.indexOf("$"), text.indexOf("$") + 1, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
|
||||||
|
builder.setHtmlCode(ss);
|
||||||
}
|
}
|
||||||
builder.setConfirmString(WordUtil.isNewZh() ? "獲取" : "Obtain");
|
builder.setConfirmString(WordUtil.isNewZh() ? "獲取" : "Obtain");
|
||||||
builder.setSimpleCallbackView(new DialogUitl.SimpleCallbackView() {
|
builder.setSimpleCallbackView(new DialogUitl.SimpleCallbackView() {
|
||||||
@ -157,6 +165,7 @@ public class RandomSudGameManager {
|
|||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, View title, View context, View confirmBtn, View cancelBtn) {
|
public void onConfirmClick(Dialog dialog, View title, View context, View confirmBtn, View cancelBtn) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
openTicketWeb(mContext);
|
||||||
if (simpleCallback != null) {
|
if (simpleCallback != null) {
|
||||||
simpleCallback.onConfirmClick(dialog, "");
|
simpleCallback.onConfirmClick(dialog, "");
|
||||||
}
|
}
|
||||||
@ -243,4 +252,14 @@ public class RandomSudGameManager {
|
|||||||
gameManager.setGameViewModel(gameViewModel);
|
gameManager.setGameViewModel(gameViewModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void openTicketWeb(Context mContext) {
|
||||||
|
String url = String.format(Locale.getDefault(), "%sh5/monthlyActivities/20240822/index.html?type=1&uid=%s&token=%s&isZh=%s",
|
||||||
|
CommonAppConfig.HOST,
|
||||||
|
IMLoginManager.get(mContext).getUserInfo().getId(),
|
||||||
|
IMLoginManager.get(mContext).getUserInfo().getToken(),
|
||||||
|
WordUtil.isNewZh() ? "1" : "0"
|
||||||
|
);
|
||||||
|
WebViewActivity.forward(mContext, url, true, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ import com.yunbao.common.sud.QuickStartGameViewModel;
|
|||||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||||
import com.yunbao.common.utils.AppManager;
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.DebugUtils;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@ -48,18 +49,13 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
private boolean isInitDebug = false;
|
private boolean isInitDebug = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(CheckCurrencyModel currencyModel, CreateSudRoomModel data, boolean isHome, boolean isRandom) {
|
public void onStart(CheckCurrencyModel currencyModel, CreateSudRoomModel data, boolean isHome, boolean isRandom) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
if (currencyModel == null) return;
|
|
||||||
if (isHome) {
|
|
||||||
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(data), true, isRandom, true);
|
|
||||||
} else {
|
|
||||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data).setActivityGame(true));
|
|
||||||
}
|
|
||||||
if (isInitDebug) {
|
if (isInitDebug) {
|
||||||
|
isInitDebug=false;
|
||||||
new Handler(Looper.getMainLooper())
|
new Handler(Looper.getMainLooper())
|
||||||
.postDelayed(() -> {
|
.postDelayed(() -> {
|
||||||
DebugDialog.getInstance(new DebugDialog.DebugDialogRunnable() {
|
DebugDialog.getInstance(new DebugDialog.DebugDialogRunnable() {
|
||||||
@ -86,6 +82,13 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
});
|
});
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
|
if (currencyModel == null) return;
|
||||||
|
if (isHome) {
|
||||||
|
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(data), true, isRandom, true);
|
||||||
|
} else {
|
||||||
|
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data).setActivityGame(true));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +99,8 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
comboNumberForMy = 0;
|
comboNumberForMy = 0;
|
||||||
comboNumberForOther = 0;
|
comboNumberForOther = 0;
|
||||||
if (autoJoinRobotHandler != null) {
|
if (autoJoinRobotHandler != null) {
|
||||||
|
LogUtils.e("终止机器人");
|
||||||
|
DebugUtils.showStackTrace();
|
||||||
autoJoinRobotHandler.removeCallbacks(autoJoinRobotRunnable);
|
autoJoinRobotHandler.removeCallbacks(autoJoinRobotRunnable);
|
||||||
autoJoinRobotHandler = null;
|
autoJoinRobotHandler = null;
|
||||||
}
|
}
|
||||||
|
@ -221,12 +221,6 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
|||||||
break;
|
break;
|
||||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN: // 8. 开始游戏按钮点击状态
|
case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN: // 8. 开始游戏按钮点击状态
|
||||||
SudMGPMGState.MGCommonSelfClickStartBtn mgCommonSelfClickStartBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickStartBtn.class);
|
SudMGPMGState.MGCommonSelfClickStartBtn mgCommonSelfClickStartBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickStartBtn.class);
|
||||||
DebugUtils.runDebugCode(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
RandomSudGameManager.getManager().reset();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Bus.get().post(new CheckRemainingBalanceEvent(null).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN));
|
Bus.get().post(new CheckRemainingBalanceEvent(null).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN));
|
||||||
// if (listener == null) {
|
// if (listener == null) {
|
||||||
// ISudFSMStateHandleUtils.handleSuccess(handle);
|
// ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.views;
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
@ -22,6 +23,7 @@ import com.yunbao.common.bean.CheckRemainingBalance;
|
|||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||||
|
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
||||||
import com.yunbao.common.bean.SudGameInfoBean;
|
import com.yunbao.common.bean.SudGameInfoBean;
|
||||||
import com.yunbao.common.bean.SudGameScoreBean;
|
import com.yunbao.common.bean.SudGameScoreBean;
|
||||||
import com.yunbao.common.dialog.SudGameDoubleDialog;
|
import com.yunbao.common.dialog.SudGameDoubleDialog;
|
||||||
@ -36,14 +38,17 @@ import com.yunbao.common.glide.ImgLoader;
|
|||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.manager.RandomSudGameManager;
|
||||||
import com.yunbao.common.sud.QuickStartGameViewModel;
|
import com.yunbao.common.sud.QuickStartGameViewModel;
|
||||||
import com.yunbao.common.sud.model.GameConfigModel;
|
import com.yunbao.common.sud.model.GameConfigModel;
|
||||||
import com.yunbao.common.sud.model.GameViewInfoModel;
|
import com.yunbao.common.sud.model.GameViewInfoModel;
|
||||||
import com.yunbao.common.sud.state.SudMGPAPPState;
|
import com.yunbao.common.sud.state.SudMGPAPPState;
|
||||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -69,6 +74,8 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
private SudGameDoubleDialog sudGameDoubleDialog;//双人游戏弹窗
|
private SudGameDoubleDialog sudGameDoubleDialog;//双人游戏弹窗
|
||||||
private SudGameMultipleDialog sudGameMultipleDialog;//多人游戏弹窗
|
private SudGameMultipleDialog sudGameMultipleDialog;//多人游戏弹窗
|
||||||
private SudLoadDialog sudLoadDialog;//加载弹窗
|
private SudLoadDialog sudLoadDialog;//加载弹窗
|
||||||
|
private boolean isActivityGame;
|
||||||
|
private boolean isRandomRankUser;
|
||||||
|
|
||||||
public LiveSudGamePopup(@NonNull Context context, long interactionID, String liveUid) {
|
public LiveSudGamePopup(@NonNull Context context, long interactionID, String liveUid) {
|
||||||
super(context);
|
super(context);
|
||||||
@ -84,7 +91,9 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
//第二次进入时,viewmodel数据丢失,所以初始化时直接获取
|
//第二次进入时,viewmodel数据丢失,所以初始化时直接获取
|
||||||
gameViewModel.getScore(mCreateSudRoomModel.getSudGameRoomId(),getActivity());
|
gameViewModel.getScore(mCreateSudRoomModel.getSudGameRoomId(),getActivity());
|
||||||
IMLoginManager.get(context).setSudGame("");
|
IMLoginManager.get(context).setSudGame("");
|
||||||
|
if (isActivityGame) {
|
||||||
|
RandomSudGameManager.getManager().setGameViewModel(gameViewModel);
|
||||||
|
}
|
||||||
// 设置游戏安全操作区域
|
// 设置游戏安全操作区域
|
||||||
GameViewInfoModel.GameViewRectModel gameViewRectModel = new GameViewInfoModel.GameViewRectModel();
|
GameViewInfoModel.GameViewRectModel gameViewRectModel = new GameViewInfoModel.GameViewRectModel();
|
||||||
gameViewRectModel.left = 0;
|
gameViewRectModel.left = 0;
|
||||||
@ -97,6 +106,7 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
sudGameDoubleDialog = new SudGameDoubleDialog(context);//双人游戏
|
sudGameDoubleDialog = new SudGameDoubleDialog(context);//双人游戏
|
||||||
sudGameMultipleDialog = new SudGameMultipleDialog(context);//多人游戏
|
sudGameMultipleDialog = new SudGameMultipleDialog(context);//多人游戏
|
||||||
sudLoadDialog = new SudLoadDialog(context);//加载弹窗
|
sudLoadDialog = new SudLoadDialog(context);//加载弹窗
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 返回自定义弹窗的布局
|
// 返回自定义弹窗的布局
|
||||||
@ -115,6 +125,16 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LiveSudGamePopup setActivityGame(boolean activityGame) {
|
||||||
|
isActivityGame = activityGame;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveSudGamePopup setRandomRankUser(boolean randomRankUser) {
|
||||||
|
isRandomRankUser = randomRankUser;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
gameContainer = findViewById(R.id.game_container);
|
gameContainer = findViewById(R.id.game_container);
|
||||||
gameTitle = findViewById(R.id.game_title);
|
gameTitle = findViewById(R.id.game_title);
|
||||||
@ -201,7 +221,10 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
gameConfigModel.ui.start_btn.custom = true;
|
gameConfigModel.ui.start_btn.custom = true;
|
||||||
// SudMGP平台64bit游戏ID
|
// SudMGP平台64bit游戏ID
|
||||||
gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID);
|
gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID);
|
||||||
|
if(isActivityGame){
|
||||||
|
sudGameDoubleDialog.setActivityGame();
|
||||||
|
sudLoadDialog.setActivityGame();
|
||||||
|
}
|
||||||
//游戏结算结束
|
//游戏结算结束
|
||||||
gameViewModel.listMutableLiveData.observe(this, sudSettleBeans -> {
|
gameViewModel.listMutableLiveData.observe(this, sudSettleBeans -> {
|
||||||
if (sudLoadDialog.getClickStatus() == 0) {
|
if (sudLoadDialog.getClickStatus() == 0) {
|
||||||
@ -224,6 +247,10 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
Bus.get().post(new CheckRemainingBalanceEvent(null).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN).setSubReady(false));
|
Bus.get().post(new CheckRemainingBalanceEvent(null).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN).setSubReady(false));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//通知活动游戏
|
||||||
|
if (isActivityGame) {
|
||||||
|
RandomSudGameManager.getManager().onInitGame(mCreateSudRoomModel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||||
@ -273,6 +300,9 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onCheckRemainingBalanceEvent(CheckRemainingBalanceEvent event) {
|
public void onCheckRemainingBalanceEvent(CheckRemainingBalanceEvent event) {
|
||||||
|
if (isActivityGame) {
|
||||||
|
RandomSudGameManager.getManager().onGameState(event);
|
||||||
|
}
|
||||||
switch (event.getSudMGPMGState()) {
|
switch (event.getSudMGPMGState()) {
|
||||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN:
|
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN:
|
||||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN:
|
case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN:
|
||||||
@ -313,15 +343,58 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
//获取用户信息
|
//获取用户信息
|
||||||
LiveNetManager.get(getContext()).getSudGameInfo(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<List<SudGameInfoBean>>() {
|
LiveNetManager.get(getContext()).getSudGameInfo(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<List<SudGameInfoBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<SudGameInfoBean> data) {
|
public void onSuccess(List<SudGameInfoBean> infoBean) {
|
||||||
if (!data.isEmpty()){
|
if (!infoBean.isEmpty()) {
|
||||||
gameViewModel.setSudGameInfoBeanList(data);
|
System.out.println("结算,是否为游戏活动:" + isActivityGame);
|
||||||
gameViewModel.sudGameRank(event.getMgCommonGameSettle());
|
if (isActivityGame) {
|
||||||
}else {
|
loadScore(infoBean, 3);
|
||||||
ToastUtil.show(getContext().getString(R.string.net_error));
|
} else {
|
||||||
|
gameViewModel.setSudGameInfoBeanList(infoBean);
|
||||||
|
gameViewModel.sudGameRank(event.getMgCommonGameSettle(null));//结算游戏
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isActivityGame) {
|
||||||
|
showDialog();
|
||||||
|
} else {
|
||||||
|
ToastUtil.show(WordUtil.getNewString(R.string.net_error));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void showDialog() {
|
||||||
|
DialogUitl.showSimpleDialog(getContext(), WordUtil.isNewZh() ? "結算超時\n請前往活動頁面查看本局結果" :
|
||||||
|
"Settlement timed out\nPlease check the result on the event page Confirm.", new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadScore(List<SudGameInfoBean> infoBean, int index) {
|
||||||
|
if (index == 0) {
|
||||||
|
showDialog();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.ballClearanceTableGetResultScore(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<SudActivityGameInfoBean> data) {
|
||||||
|
if (data.isEmpty()) {
|
||||||
|
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
|
loadScore(infoBean, index - 1);
|
||||||
|
}, 500);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gameViewModel.setSudGameInfoBeanList(infoBean);
|
||||||
|
gameViewModel.sudGameRank(event.getMgCommonGameSettle(data));//结算游戏
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show(error);
|
||||||
|
@ -235,7 +235,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
|||||||
@Override
|
@Override
|
||||||
public void onCancel() {
|
public void onCancel() {
|
||||||
if (CommonAppConfig.getInstance().getConfig().isSw()) {
|
if (CommonAppConfig.getInstance().getConfig().isSw()) {
|
||||||
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(createSudRoomModel), true,false, isHome);
|
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(createSudRoomModel), isActivity,false, isHome);
|
||||||
} else {
|
} else {
|
||||||
RouteUtil.forwardRySudGameActivity(new Gson().toJson(createSudRoomModel), true, isHome);
|
RouteUtil.forwardRySudGameActivity(new Gson().toJson(createSudRoomModel), true, isHome);
|
||||||
}
|
}
|
||||||
@ -245,8 +245,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setActivityGame(isActivity).setCreateSudRoomModel(createSudRoomModel));
|
||||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
|
|
||||||
Bus.get().post(new SudGameListDissMissEvent());
|
Bus.get().post(new SudGameListDissMissEvent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1558,7 +1558,7 @@
|
|||||||
<string name="live_end_view_ban_reason">Violation reasons:</string>
|
<string name="live_end_view_ban_reason">Violation reasons:</string>
|
||||||
<string name="live_end_view_ban_content">Penalty content:</string>
|
<string name="live_end_view_ban_content">Penalty content:</string>
|
||||||
<string name="live_end_view_ban_timer">Penalty time:</string>
|
<string name="live_end_view_ban_timer">Penalty time:</string>
|
||||||
<string name="live_end_view_ban_punish_title">Punishment Notice</string>
|
<string name="live_end_view_ban_punish_title">Penalty Notice</string>
|
||||||
<string name="game_create_coid_ticket">Ticket</string>
|
<string name="game_create_coid_ticket">Ticket</string>
|
||||||
<string name="game_list_activity_title">Challenge One-shot clearance Share high bonuses</string>
|
<string name="game_list_activity_title">Challenge One-shot clearance Share high bonuses</string>
|
||||||
<string name="game_dialog_loading_tips_text"> Settlement timed out. Please check the result on the event page</string>
|
<string name="game_dialog_loading_tips_text"> Settlement timed out. Please check the result on the event page</string>
|
||||||
|
@ -1724,6 +1724,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
case 0:
|
case 0:
|
||||||
if (liveSudGamePopupXPopup == null) {
|
if (liveSudGamePopupXPopup == null) {
|
||||||
liveSudGamePopupXPopup = new LiveSudGamePopup(mContext, event.getCreateSudRoomModel());
|
liveSudGamePopupXPopup = new LiveSudGamePopup(mContext, event.getCreateSudRoomModel());
|
||||||
|
liveSudGamePopupXPopup.setActivityGame(event.isActivityGame());
|
||||||
new XPopup.Builder(mContext).enableDrag(false).dismissOnTouchOutside(false).dismissOnBackPressed(false).asCustom(liveSudGamePopupXPopup).show();
|
new XPopup.Builder(mContext).enableDrag(false).dismissOnTouchOutside(false).dismissOnBackPressed(false).asCustom(liveSudGamePopupXPopup).show();
|
||||||
} else {
|
} else {
|
||||||
if (liveSudGamePopupXPopup != null) {
|
if (liveSudGamePopupXPopup != null) {
|
||||||
|
@ -1950,6 +1950,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
case 0:
|
case 0:
|
||||||
if (liveSudGamePopupXPopup == null) {
|
if (liveSudGamePopupXPopup == null) {
|
||||||
liveSudGamePopupXPopup = new LiveSudGamePopup(mContext, event.getCreateSudRoomModel());
|
liveSudGamePopupXPopup = new LiveSudGamePopup(mContext, event.getCreateSudRoomModel());
|
||||||
|
liveSudGamePopupXPopup.setActivityGame(event.isActivityGame());
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.dismissOnTouchOutside(false)
|
.dismissOnTouchOutside(false)
|
||||||
|
@ -44,6 +44,7 @@ import com.opensource.svgaplayer.SVGADrawable;
|
|||||||
import com.opensource.svgaplayer.SVGAImageView;
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
import com.opensource.svgaplayer.SVGAParser;
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||||
|
import com.yunbao.common.utils.DebugUtils;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.yunbao.common.utils.MobclickAgent;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
@ -1432,7 +1433,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
Bus.get().post(event);
|
Bus.get().post(event);
|
||||||
}).build().show();
|
}).build().show();
|
||||||
|
|
||||||
AppManager.runDebugCode(() -> {
|
DebugUtils.runDebugCode(() -> {
|
||||||
Log.i("gifBean", mGiftBean.toString());
|
Log.i("gifBean", mGiftBean.toString());
|
||||||
});
|
});
|
||||||
} else if (code == 1001) {
|
} else if (code == 1001) {
|
||||||
|
@ -46,9 +46,11 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_sys_msg_punish"
|
android:id="@+id/tv_sys_msg_punish"
|
||||||
android:layout_width="60dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="25dp"
|
android:layout_height="25dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:background="@drawable/bg_ffae04_6dp"
|
android:background="@drawable/bg_ffae04_6dp"
|
||||||
|
Loading…
Reference in New Issue
Block a user