|
|
@@ -73,21 +73,21 @@ class FreeTrainActivity : BaseMVVMActivity<ActivityFreeTrainBinding, FreeTrainVi
|
|
|
rvTrain.adapter = freeTrainListAdapter
|
|
|
freeTrainListAdapter.setType(type)
|
|
|
freeTrainListAdapter.onGameClickListener = { bean, position ->
|
|
|
-// if (TextUtils.equals("0", bean.status)) {
|
|
|
-// TipsDialog.TipDialogBuilder()
|
|
|
-// .title("恭喜您")
|
|
|
-// .content("当前游戏已通关,是否重新开始?")
|
|
|
-// .leftBtnText("取消")
|
|
|
-// .rightBtnText("确定")
|
|
|
-// .leftClick({
|
|
|
-// }, true)
|
|
|
-// .rightClick({
|
|
|
-// gameReplay(bean, position)
|
|
|
-// }, true)
|
|
|
-// .show(supportFragmentManager)
|
|
|
-// } else {
|
|
|
+ if (TextUtils.equals("0", bean.status)) {
|
|
|
+ TipsDialog.TipDialogBuilder()
|
|
|
+ .title("恭喜您")
|
|
|
+ .content("当前游戏已通关,是否重新开始?")
|
|
|
+ .leftBtnText("取消")
|
|
|
+ .rightBtnText("确定")
|
|
|
+ .leftClick({
|
|
|
+ }, true)
|
|
|
+ .rightClick({
|
|
|
+ gameReplay(bean, position)
|
|
|
+ }, true)
|
|
|
+ .show(supportFragmentManager)
|
|
|
+ } else {
|
|
|
jumeGame(bean, position)
|
|
|
-// }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -109,7 +109,7 @@ class FreeTrainActivity : BaseMVVMActivity<ActivityFreeTrainBinding, FreeTrainVi
|
|
|
private fun jumeGame(bean: Record, position: Int) {
|
|
|
gameId = bean.id
|
|
|
gameIndex = position
|
|
|
- ARouter.getInstance().build(RouterUrlCommon.gameSettlement)
|
|
|
+ ARouter.getInstance().build(RouterUrlCommon.gameIntroduction)
|
|
|
.withString("gameCode", bean.gameCode)
|
|
|
.withString("playClass", bean.playClass)
|
|
|
.withString("videoUrl", bean.gameVideoUrl)
|