82 fix bugs,网络请求timeout=30。隐藏init chat failed 弹窗。

This commit is contained in:
2025-12-29 22:29:01 +08:00
parent 67c56b2d4f
commit e6892d533c
10 changed files with 88 additions and 66 deletions

View File

@@ -1,5 +1,6 @@
package com.xscm.modulemain.dialog
import android.app.Activity
import android.content.Context
import android.graphics.drawable.Drawable
import android.view.Gravity
@@ -20,7 +21,7 @@ import com.xscm.modulemain.databinding.DialogSignTypeBinding
import com.xscm.moduleutil.utils.ImageUtils
import com.xscm.moduleutil.widget.dialog.BaseDialog
class DialogSignType(context:Context) : BaseDialog<DialogSignTypeBinding>(context){
class DialogSignType(context:Activity) : BaseDialog<DialogSignTypeBinding>(context){
init {
window?.apply {
setGravity(Gravity.TOP)
@@ -58,7 +59,13 @@ class DialogSignType(context:Context) : BaseDialog<DialogSignTypeBinding>(contex
}
fun show(type:Int){
super.show()
if (context is Activity) {
val activity = context as Activity
if (!activity.isFinishing && !activity.isDestroyed) {
super.show()
}
}
//0:开始 1成功 2:失败
when(type){
0 ->{
@@ -85,9 +92,6 @@ class DialogSignType(context:Context) : BaseDialog<DialogSignTypeBinding>(contex
}, 1500)
}
}
}
var webpDrawable:WebpDrawable? = null
fun loadWebpOneStart(webp_anim: Int, mAnimView: ImageView?) {

View File

@@ -830,19 +830,24 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
private void upTitle(int boxPrice) {
if (type == 10) {
mBinding.mirroeSky.oneTitle.setText(boxPrice + "币一次");
mBinding.mirroeSky.tenTitle.setText((boxPrice * 6) + "币六次");
mBinding.mirroeSky.hundredTitle.setText((boxPrice * 9) + "");
} else if (type == 11) {
mBinding.cityTime.oneTitle.setText(boxPrice + "");
mBinding.cityTime.tenTitle.setText((boxPrice * 6) + "币六次");
mBinding.cityTime.hundredTitle.setText((boxPrice * 9) + "");
try {
//不知道什么原因会出现mBinding.pinnacleTime.oneTitle为空的情况
if (type == 10) {
mBinding.mirroeSky.oneTitle.setText(boxPrice + "");
mBinding.mirroeSky.tenTitle.setText((boxPrice * 6) + "币六次");
mBinding.mirroeSky.hundredTitle.setText((boxPrice * 9) + "");
} else if (type == 11) {
mBinding.cityTime.oneTitle.setText(boxPrice + "");
mBinding.cityTime.tenTitle.setText((boxPrice * 6) + "币六次");
mBinding.cityTime.hundredTitle.setText((boxPrice * 9) + "币九次");
} else if (type == 12) {
mBinding.pinnacleTime.oneTitle.setText(boxPrice + "币一次");
mBinding.pinnacleTime.tenTitle.setText((boxPrice * 6) + "币六次");
mBinding.pinnacleTime.hundredTitle.setText((boxPrice * 9) + "币九次");
} else if (type == 12) {
mBinding.pinnacleTime.oneTitle.setText(boxPrice + "币一次");
mBinding.pinnacleTime.tenTitle.setText((boxPrice * 6) + "币六次");
mBinding.pinnacleTime.hundredTitle.setText((boxPrice * 9) + "币九次");
}
}catch (Exception e){
e.printStackTrace();
}
}

View File

@@ -432,33 +432,39 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
}
private String getValue(int type, String key) {
Map<String, String> textMap = new HashMap<>();
textMap.put("is_manager", userInfo.getIs_manager().equals("1") ? "取消管理" : "设为管理");
textMap.put("is_host", userInfo.getIs_host().equals("1") ? "取消主持" : "设为主持");
textMap.put("is_mute", userInfo.getIs_mute_pit().equals("1") ? "开麦" : "禁麦");
textMap.put("is_mute_pit", userInfo.getIs_mute().equals("1") ? "解除禁言" : "");
try {
Map<String, String> textMap = new HashMap<>();
textMap.put("is_manager", userInfo.getIs_manager().equals("1") ? "取消管理" : "设为管理");
textMap.put("is_host", userInfo.getIs_host().equals("1") ? "取消主持" : "设为主持");
textMap.put("is_mute", userInfo.getIs_mute_pit().equals("1") ? "开麦" : "");
textMap.put("is_mute_pit", userInfo.getIs_mute().equals("1") ? "解除禁言" : "禁言");
switch (type) {
case 1://房主
if ("is_manager".equals(key)) return textMap.get("is_manager");
if ("is_host".equals(key)) return textMap.get("is_host");
if ("is_mute".equals(key)) return textMap.get("is_mute");
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
break;
case 2:
if ("is_host".equals(key)) return textMap.get("is_host");
if ("is_mute".equals(key)) return textMap.get("is_mute");
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
break;
case 3:
if ("is_mute".equals(key)) return textMap.get("is_mute");
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
break;
default:
break;
switch (type) {
case 1://房主
if ("is_manager".equals(key)) return textMap.get("is_manager");
if ("is_host".equals(key)) return textMap.get("is_host");
if ("is_mute".equals(key)) return textMap.get("is_mute");
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
break;
case 2:
if ("is_host".equals(key)) return textMap.get("is_host");
if ("is_mute".equals(key)) return textMap.get("is_mute");
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
break;
case 3:
if ("is_mute".equals(key)) return textMap.get("is_mute");
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
break;
default:
break;
}
return "";
}catch (Exception e){
e.printStackTrace();
return "";
}
return "";
}
@Override