|
@@ -359,25 +359,18 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
|
|
|
fun openGameDialog() {
|
|
fun openGameDialog() {
|
|
SwagoRoomManager.iRoomInfo?.let {
|
|
SwagoRoomManager.iRoomInfo?.let {
|
|
- when(it.getGameType()){
|
|
|
|
- 1,2 -> {
|
|
|
|
- val download = checkGameVersion(
|
|
|
|
- it.getGameType().toString(),
|
|
|
|
- it.getGameDownLoadUrl(),
|
|
|
|
- it.getGameVersion().toString()
|
|
|
|
- )
|
|
|
|
- if (download) {
|
|
|
|
- gameDialog =
|
|
|
|
- GamePlayDialog.newInstance("file://" + UrlConstant.appGameRootPath + File.separator + it.getGameType() + File.separator + "index.html")
|
|
|
|
- } else {
|
|
|
|
- gameDialog = GamePlayDialog.newInstance(it.getGameUrl())
|
|
|
|
- }
|
|
|
|
- gameDialog?.show(childFragmentManager, "GamePlayDialog")
|
|
|
|
- }
|
|
|
|
- else -> {
|
|
|
|
- Toast.makeText(AppContext.getContext(), AppContext.getContext().resources.getString(R.string.please_update), Toast.LENGTH_SHORT).show()
|
|
|
|
- }
|
|
|
|
|
|
+ val download = checkGameVersion(
|
|
|
|
+ it.getGameType().toString(),
|
|
|
|
+ it.getGameDownLoadUrl(),
|
|
|
|
+ it.getGameVersion().toString()
|
|
|
|
+ )
|
|
|
|
+ if (download) {
|
|
|
|
+ gameDialog =
|
|
|
|
+ GamePlayDialog.newInstance("file://" + UrlConstant.appGameRootPath + File.separator + it.getGameType() + File.separator + "index.html")
|
|
|
|
+ } else {
|
|
|
|
+ gameDialog = GamePlayDialog.newInstance(it.getGameUrl())
|
|
}
|
|
}
|
|
|
|
+ gameDialog?.show(childFragmentManager, "GamePlayDialog")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|