82
This commit is contained in:
@@ -876,14 +876,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
override fun onConnectFailed(code: Int, error: String?) {
|
||||
LogUtils.e("@@@", "断开连接")
|
||||
LogUtils.e("@@@", "断开连接:${error} code:$code")
|
||||
CommonAppContext.getInstance().onConnectFailed = true
|
||||
}
|
||||
|
||||
override fun onKickedOffline() {
|
||||
// queren1();
|
||||
LogUtils.e("@@@", "您的账号已被挤下线")
|
||||
if (CommonAppContext.getInstance().playId != null) {
|
||||
ToastUtils.show("您的账号已被挤下线")
|
||||
runOnUiThread {
|
||||
ToastUtils.show("您的账号已被挤下线")
|
||||
}
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo()
|
||||
} catch (e: ClassNotFoundException) {
|
||||
@@ -892,9 +895,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
override fun onUserSigExpired() {}
|
||||
override fun onUserSigExpired() {
|
||||
LogUtils.e("@@@", "onUserSigExpired")
|
||||
}
|
||||
|
||||
override fun onSelfInfoUpdated(info: V2TIMUserFullInfo?) {}
|
||||
override fun onSelfInfoUpdated(info: V2TIMUserFullInfo?) {
|
||||
LogUtils.e("@@@", "onSelfInfoUpdated:${info?.toString()}")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1532,6 +1539,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
messageEvent.text.rights_icon
|
||||
)
|
||||
}
|
||||
|
||||
//TODO================ CP入场不触发播放 临时添加===============
|
||||
Observable.timer(1000, TimeUnit.MILLISECONDS).observeOn(
|
||||
AndroidSchedulers.mainThread()
|
||||
).subscribe { aLong: Long? ->
|
||||
if (ActivityUtils.getTopActivity() is RoomActivity) {
|
||||
toActivity(TransparentActivity::class.java)
|
||||
}
|
||||
}
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSignStartText) {
|
||||
roomFragment?.handleRoomMessage(messageEvent)
|
||||
softRebuildUI()
|
||||
@@ -2812,6 +2828,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
* @param type
|
||||
*/
|
||||
fun switchMic(type: Int) {
|
||||
logIn("switchMic-${type}-")
|
||||
if (type == 1) {
|
||||
mBinding!!.ivMic.setImageResource(com.xscm.moduleutil.R.mipmap.room_microphone)
|
||||
AgoraManager.getInstance()
|
||||
@@ -3544,7 +3561,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
roomId, pitNumber, mOnlineBean, mRoomUserBean, mRoomInfoResp,
|
||||
supportFragmentManager
|
||||
)
|
||||
LogUtils.e("fragment_onItemClickListener: ${(fragment != null)}")
|
||||
LogUtils.e("showUserListDialog: roomId-${roomId}, pitNumber-${pitNumber}, mRoomUserBean-${mRoomUserBean.toString()}, mRoomInfoResp-${mRoomInfoResp.toString()}")
|
||||
}
|
||||
|
||||
override fun applyPit() {
|
||||
@@ -4222,7 +4239,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
val builder = AlertDialog.Builder(this)
|
||||
val inflater = layoutInflater
|
||||
val dialogView =
|
||||
inflater.inflate(com.xscm.moduleutil.R.layout.room_message_input_menu, null)
|
||||
inflater.inflate(com.xscm.moduleutil.R.layout.room_message_input_menu, null)
|
||||
builder.setView(dialogView)
|
||||
val etContent = dialogView.findViewById<EditText>(com.xscm.moduleutil.R.id.et_content)
|
||||
val tvSend = dialogView.findViewById<Button>(com.xscm.moduleutil.R.id.tv_send)
|
||||
@@ -4334,6 +4351,28 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
private fun logIn(name:String){
|
||||
// ========== 核心:打印调用来源 ==========
|
||||
val stackTrace = Throwable().stackTrace
|
||||
if (stackTrace.size >= 2) { // stackTrace[0]是当前方法,stackTrace[1]是直接调用方
|
||||
val caller = stackTrace[1]
|
||||
val logMsg = "${name}() 被调用:\n" +
|
||||
"调用类:${caller.className}\n" +
|
||||
"调用方法:${caller.methodName}\n" +
|
||||
"调用行号:${caller.lineNumber}\n" +
|
||||
"调用文件:${caller.fileName}"
|
||||
// 打印到 Logcat(TAG 可自定义,比如你的页面名)
|
||||
Log.e("SwitchMicCaller", logMsg)
|
||||
// 如果需要更完整的调用链(比如多层调用),可以遍历 stackTrace
|
||||
// 示例:打印前5层调用链
|
||||
// Log.e("SwitchMicCaller", "完整调用链:")
|
||||
// for (i in 0 until minOf(stackTrace.size, 5)) {
|
||||
// val element = stackTrace[i]
|
||||
// Log.e("SwitchMicCaller", "第${i}层:${element.className}.${element.methodName} (${element.fileName}:${element.lineNumber})")
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private val CLICK_INTERVAL: Long = 500 // 500ms内不允许重复点击
|
||||
private var lastClickTime: Long = 0
|
||||
|
||||
@@ -1051,6 +1051,10 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
||||
mBinding.tvYs.setVisibility(GONE);
|
||||
mBinding.tvJs.setVisibility(GONE);
|
||||
}
|
||||
|
||||
mBinding.tvKs.requestLayout();
|
||||
mBinding.tvYs.requestLayout();
|
||||
mBinding.tvJs.requestLayout();
|
||||
}
|
||||
|
||||
/// 配置倒计时
|
||||
|
||||
@@ -236,7 +236,7 @@ class RoomMentorShipFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
MvpPre.signDelay(mSignId!!, mRoomId)
|
||||
}
|
||||
|
||||
R.id.tv_time_start ->{
|
||||
R.id.tv_time_start -> {
|
||||
MvpPre.signStart(mRoomId, mSignPitBean?.user_id!!)
|
||||
}
|
||||
|
||||
@@ -275,11 +275,13 @@ class RoomMentorShipFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
if (isStart) {
|
||||
mBinding.tvTime.visibility = View.VISIBLE
|
||||
mBinding.groupLeftPrice.visibility = View.VISIBLE
|
||||
mBinding.groupLeftPrice.requestLayout()
|
||||
if (getHostUser() < 4) {
|
||||
mBinding.tvTimeRight.visibility = View.VISIBLE
|
||||
} else {
|
||||
mBinding.tvTimeRight.visibility = View.GONE
|
||||
}
|
||||
mBinding.tvTimeRight.requestLayout()
|
||||
} else {
|
||||
mBinding.tvTimeRight.visibility = View.GONE
|
||||
mBinding.tvTime.visibility = View.GONE
|
||||
@@ -302,20 +304,22 @@ class RoomMentorShipFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
"0"
|
||||
)
|
||||
) {
|
||||
if (isStart){
|
||||
if (isStart) {
|
||||
mBinding.tvTimeLeft.visibility = View.VISIBLE
|
||||
mBinding.tvTimeStart.visibility = View.GONE
|
||||
}else{
|
||||
} else {
|
||||
mBinding.tvTimeLeft.visibility = View.GONE
|
||||
mBinding.tvTimeStart.visibility = View.VISIBLE
|
||||
}
|
||||
} else {
|
||||
if (isStart){
|
||||
if (isStart) {
|
||||
mBinding.tvTimeLeft.visibility = View.GONE
|
||||
}else{
|
||||
} else {
|
||||
mBinding.tvTimeStart.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
mBinding.tvTimeLeft.requestLayout()
|
||||
mBinding.tvTimeStart.requestLayout()
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +353,7 @@ class RoomMentorShipFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
fun roomTypeSwitch(roomInfoResp: RoomInfoResp) {
|
||||
this.mRoomInfoResp = roomInfoResp
|
||||
//重新初始化
|
||||
if (isStart){
|
||||
if (isStart) {
|
||||
stopTimer()
|
||||
isStart = false
|
||||
}
|
||||
@@ -702,6 +706,7 @@ class RoomMentorShipFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
// 在Fragment销毁时记得清理资源
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
timer.stop()
|
||||
scope.cancel()
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入身份证号");
|
||||
return;
|
||||
}
|
||||
if (RegexUtils.isIDCard18Exact(mBinding.edPassword.getText().toString())) {
|
||||
if (mBinding.edPassword.getText().toString().trim().length() == 18) {
|
||||
if (mBinding.btnSubmit.getText().toString().equals("下一步")) {
|
||||
mBinding.stepNum1.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_11));
|
||||
mBinding.stepNum2.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_2));
|
||||
|
||||
@@ -195,13 +195,17 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
|
||||
if (id == R.id.room_m_cz) {
|
||||
if (mBinding.roomMCz.getText().equals("上麦")) {
|
||||
LogUtils.e("applyPit:room_id:" + room_id + ",user_id:" + user_id);
|
||||
MvpPre.applyPit(room_id, "");
|
||||
} else if (mBinding.roomMCz.getText().equals("抱麦")) {
|
||||
LogUtils.e("抱麦:room_id:" + room_id + ",pit_number:" + pit_number + ",user_id:" + user_id);
|
||||
MvpPre.hostUserPit(room_id, pit_number, user_id, "1");
|
||||
} else {
|
||||
if (user_id.equals(SpUtil.getUserId() + "")) {
|
||||
LogUtils.e("downPit:room_id:" + room_id + ",pit_number:" + pit_number + ",user_id:" + user_id);
|
||||
MvpPre.downPit(room_id, pit_number);
|
||||
} else {
|
||||
LogUtils.e("抱麦:room_id:" + room_id + ",pit_number:" + pit_number + ",user_id:" + user_id);
|
||||
MvpPre.hostUserPit(room_id, pit_number, user_id, "2");
|
||||
}
|
||||
}
|
||||
@@ -215,6 +219,10 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
.create()
|
||||
.showAsDropDown(mBinding.roomDian, 0, 20);
|
||||
} else if (id == R.id.im_room_t) {
|
||||
if (userInfo != null && TextUtils.isEmpty(userInfo.getNickname())){
|
||||
ToastUtils.show("用户信息加载中,请稍后...");
|
||||
return;
|
||||
}
|
||||
userInfo.setTa("1");
|
||||
EventBus.getDefault().post(userInfo);
|
||||
dismiss();
|
||||
|
||||
Reference in New Issue
Block a user