消息
This commit is contained in:
@@ -245,6 +245,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
private var mOnlineBean: RoomOnline? = null
|
||||
var redPacketConfig: RedPacketConfig = RedPacketConfig()
|
||||
|
||||
private var isShowPrivateMsg = false
|
||||
|
||||
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.action == KeyEvent.ACTION_DOWN) {
|
||||
// 拦截返回键,显示退出对话框而不是直接退出
|
||||
@@ -588,6 +590,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
)
|
||||
}
|
||||
|
||||
mBinding!!.ivPrivateSet.setOnClickListener { view: View ->
|
||||
this.onClick(
|
||||
view
|
||||
)
|
||||
}
|
||||
|
||||
mBinding!!.inputMenu1.performClick()
|
||||
|
||||
V2TIMManager.getConversationManager()
|
||||
@@ -2757,6 +2765,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
maiStatus = true
|
||||
}
|
||||
// }
|
||||
} else if (id == R.id.iv_private_set) {
|
||||
if (mBinding?.ivPrivateSet?.tag == 1){
|
||||
mBinding?.ivPrivateSet?.setImageResource(R.mipmap.icon_pri_select_off)
|
||||
mBinding?.ivPrivateSet?.tag = "0"
|
||||
isShowPrivateMsg = true
|
||||
}else {
|
||||
mBinding?.ivPrivateSet?.setImageResource(R.mipmap.icon_pri_select_on)
|
||||
mBinding?.ivPrivateSet?.tag = "1"
|
||||
isShowPrivateMsg = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2938,6 +2956,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (voive) View.VISIBLE else View.GONE
|
||||
mBinding!!.rlMai.visibility =
|
||||
if (voive) View.VISIBLE else View.VISIBLE
|
||||
mBinding?.rlPrivateMsg?.visibility = View.VISIBLE
|
||||
mRoomInfoResp?.user_info?.pit_number = 9527
|
||||
}
|
||||
|
||||
/** 进入小黑屋将所有的底部隐藏 */
|
||||
@@ -2960,6 +2980,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (voive) View.VISIBLE else View.GONE
|
||||
mBinding!!.clFirstCharge.visibility =
|
||||
if (voive) View.VISIBLE else View.GONE
|
||||
mBinding?.rlPrivateMsg?.visibility = View.GONE
|
||||
}
|
||||
|
||||
/** 这里是当进入电影放房的时候,如果是排麦模式,并且不是电影放的时候,就隐藏排麦视图 */
|
||||
@@ -4550,79 +4571,3 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 房间内区分逻辑
|
||||
mBinding?.ivSoundEffects?.visibility = View.GONE
|
||||
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.AUCTION) {
|
||||
mRoomInfoResp?.room_info?.pit_list?.forEachIndexed { index, pit ->
|
||||
if (index == 0) {
|
||||
if (mRoomInfoResp?.user_info?.pit_number != 0 && pit.user_id.equals(
|
||||
mRoomInfoResp?.user_info?.user_id.toString()
|
||||
)
|
||||
) {
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
mBinding?.ivSoundEffects?.visibility = View.VISIBLE
|
||||
} else if (mRoomInfoResp?.room_auction?.auction_user?.user_id.equals(
|
||||
mRoomInfoResp?.user_info?.user_id.toString()
|
||||
)
|
||||
) { //拍卖房 888麦位
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
} else if (mRoomInfoResp?.room_auction?.auction_list != null && mRoomInfoResp?.room_auction?.auction_list?.size!! > 0) {
|
||||
mRoomInfoResp?.room_auction?.auction_list?.forEachIndexed { index, auction ->
|
||||
if (index < 6 && auction.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBinding?.rlMai?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mRoomInfoResp?.room_info?.pit_list?.forEachIndexed { index, pit ->
|
||||
//判断是交友房 练歌房
|
||||
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
|
||||
&& mRoomInfoResp?.room_info?.label_id.equals("2")
|
||||
) {
|
||||
|
||||
if (!mRoomInfoResp?.song_user_info?.user_id.isNullOrEmpty()) {
|
||||
if (mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
} else {
|
||||
mBinding?.rlMai?.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
mRoomInfoResp?.song_pit_list?.forEach { songPit ->
|
||||
if (songPit.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
} else {
|
||||
mBinding?.rlMai?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.JUKEBOX) {
|
||||
if (mRoomInfoResp?.singer_info?.song_info?.user_id!! > 0
|
||||
&& mRoomInfoResp?.singer_info?.song_info?.user_id == mRoomInfoResp?.user_info?.user_id
|
||||
) {
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
} else {
|
||||
if (pit.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
mBinding?.rlMai?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//判断是交友房 and 自己是主持麦
|
||||
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
|
||||
&& index == 8
|
||||
&& pit.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())
|
||||
) {
|
||||
mBinding?.rlPk?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
//音效
|
||||
if (index == 8 && pit.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
mBinding?.ivSoundEffects?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@@ -75,7 +75,6 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
private MessageExListenerSingleton.PublicScreenMessageListener messageExListener;
|
||||
@Setter
|
||||
public boolean isPriRoom = false;
|
||||
|
||||
// 在需要的地方调用 Activity 的方法
|
||||
public void someMethod() {
|
||||
easeChatAdapter.clearData();
|
||||
|
||||
@@ -340,8 +340,9 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
startTimer(messageEvent.text.end_time.toLong())
|
||||
if (pitNumber != "9" && pitNumber != "10") {
|
||||
startTimer(messageEvent.text.end_time.toLong())
|
||||
}
|
||||
}
|
||||
|
||||
fun event1004(messageEvent: RoomMessageEvent) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xscm.modulemain.utils
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
@@ -18,7 +19,7 @@ class CountdownTimer {
|
||||
while (true) {
|
||||
val currentTime = System.currentTimeMillis() / 1000
|
||||
val remainingTime = (endTimestamp - currentTime) * 1000 // 转换为毫秒
|
||||
|
||||
LogUtils.e("startCountdown:"+remainingTime)
|
||||
if (remainingTime <= 0) {
|
||||
_timeLeft.value = 0
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user