@@ -172,12 +172,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
fun addActiveDialogFragment ( dialogFragment : Fragment ) {
activeDialogFragments . add ( dialogFragment )
}
override fun doDone ( ) {
isOnline = intent . getBooleanExtra ( " isOnline " , false )
password = intent . getStringExtra ( " password " )
roomId = intent . getStringExtra ( " roomId " )
mRoomInfoResp = intent . getSerializableExtra ( " roomInfo " ) as RoomInfoResp ?
LogUtils . dTag ( " RoomActivity " , " doDone " + mRoomInfoResp . toString ( ) )
LogUtils . dTag ( " RoomActivity " , " doDone " + mRoomInfoResp . toString ( ) )
}
@@ -286,7 +287,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
override fun onPause ( ) {
super . onPause ( )
LogUtils . e ( " RoomActivity " , " onPause " )
GiftDisplayManager . getInstance ( ) . clearAll ( )
if ( mRoomInfoResp != null ) {
if ( mRoomInfoResp !! . room _info . type _id != " 6 " ) {
// 只有在用户主动离开应用时才执行最小化操作
@@ -370,7 +371,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
// 调用退出房间方法
MessageListenerSingleton . quitGroup ( roomId ) ;
quit ( ) ;
if ( mRoomInfoResp ?. getRoom _info ( ) ?. getLabel _id ( ) != null && mRoomInfoResp ?. getRoom _info ( ) ?. getLabel _id ( )
if ( mRoomInfoResp ?. getRoom _info ( ) ?. getLabel _id ( ) != null && mRoomInfoResp ?. getRoom _info ( )
?. getLabel _id ( )
. equals ( " 5 " )
) {
jiaR ( ) ;
@@ -475,6 +477,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
QXGiftPlayerManager . getInstance ( applicationContext ) . destroyEffectSvga ( )
cleanupResources ( )
}
private lateinit var giftManager : GiftDisplayManager
private val testHandler = Handler ( )
private var testRunnable : Runnable ? = null
@@ -548,8 +551,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
// 初始化礼物管理器
giftManager = GiftDisplayManager . getInstance ( )
giftManager . setupDisplayView ( mBinding !! . giftContainer )
GiftDisplayManager . getInstance ( ) . setupDisplayView ( mBinding !! . giftContainer )
}
@@ -586,25 +588,20 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
override fun onSelfInfoUpdated ( info : V2TIMUserFullInfo ? ) { }
}
private fun setview ( resp : RoomInfoResp ? ) {
if ( resp == null )
return
AppStateManager . getInstance ( ) . roomInfo = resp
this . mRoomInfoResp = resp
val roomBean = resp . room _info
this . mRoomBean = roomBean
this . mRoomUserBean = resp . user _info
this . mRoomOwnerBean = resp . room _owner
this . mPitList = mRoomBean !! . pit _list
CommonAppContext . getInstance ( ) . isPlaying = true
CommonAppContext . getInstance ( ) . playId = roomId
CommonAppContext . getInstance ( ) . playName = mRoomBean !! . room _name
CommonAppContext . getInstance ( ) . playCover = resp . room _info . room _cover
CommonAppContext . getInstance ( ) . showSelf = resp . is _show _self == 1
this . roomId = roomBean . room _id
MessageListenerSingleton . getInstance ( ) . joinGroup ( roomId ) //加入房间im
ImageUtils . loadHeadCC ( resp . room _info . room _cover , mBinding !! . roomTop . avatar )
mBinding !! . roomTop . name . text = roomBean . room _name
mBinding !! . roomTop . idVal . text = " ID: " + roomBean . room _number
if ( mRoomUserBean ?. getIs _room _owner ( ) == 1 ) {
@@ -619,6 +616,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
number = roomBean . online _number
mBinding !! . roomTop . tvNum . text = number . toString ( ) + " "
val userIds = StringBuilder ( )
for ( i in mRoomInfoResp !! . room _info . pit _list . indices ) {
val userId = mRoomInfoResp !! . room _info . pit _list [ i ] . user _id
@@ -640,6 +638,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
} else {
Log . e ( " Fragment " , " Fragment transaction skipped due to state loss. " )
}
LogUtils . e ( " 加入 " , roomId )
CommonAppContext . getInstance ( ) . isPlaying = true
CommonAppContext . getInstance ( ) . playId = roomId
CommonAppContext . getInstance ( ) . playName = mRoomBean !! . room _name
CommonAppContext . getInstance ( ) . playCover = resp . room _info . room _cover
CommonAppContext . getInstance ( ) . showSelf = resp . is _show _self == 1
if ( mRoomUserBean ?. getIs _collect ( ) == 1 ) {
mBinding !! . roomTop . btnFollow . background =
@@ -653,6 +659,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
)
mBinding !! . roomTop . btnFollow . setTextColor ( ColorManager . getInstance ( ) . buttonColorInt )
mBinding !! . roomTop . btnFollow . text = " 收藏 "
// mBinding.roomTop.btnFollow.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.collect));
}
if ( ( roomBean . type _id == " 3 " || roomBean . type _id == " 1 " || roomBean . type _id == " 4 " ) && roomBean . label _id == " 2 " ) {
AgoraManager . getInstance ( this ) . isBjMusic = false
@@ -662,10 +669,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
AgoraManager . stopMuisc ( )
initializeAudio ( )
toutiao ( )
upRoomInfo ( resp )
instView ( )
if ( mRoomInfoResp !! . user _info . pit _number == 9 && mRoomInfoResp !! . user _info . user _id == SpUtil . getUserId ( )
@@ -678,18 +683,31 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
ivSoundEffects ( false )
}
if ( mRoomInfoResp !! . room _info . type _id == " 7 " || mRoomInfoResp !! . room _info . type _id == " 2 " ) {
if ( resp . room _info . type _id == " 7 " || resp . room _info . type _id == " 2 " ) {
mBinding !! . rlMore . visibility = View . GONE
mBinding !! . rlMisc . visibility = View . GONE
}
setupEffectView ( )
// 使用Handler延迟执行, 确保Fragment视图已完全创建
Handler ( Looper . getMainLooper ( ) ) . post {
if ( publicScreenFragment != null && publicScreenFragment !! . isAdded && publicScreenFragment !! . view != null ) {
publicScreenFragment !! . getUpRoomInfo ( resp )
}
}
if ( mRoomInfoResp !! . gift _cycle != null && mRoomInfoResp !! . gift _cycle . xlh _info != null && mRoomInfoResp !! . gift _cycle . xlh _info . xlh _status != null && mRoomInfoResp !! . gift _cycle . xlh _info . xlh _status == " 1 " ) {
mBinding ?. xlhRk ?. visibility = View . VISIBLE
xlhDjs ( mRoomInfoResp !! . gift _cycle . xlh _info . end _time )
} else {
mBinding ?. xlhRk ?. visibility = View . INVISIBLE
releaseCountDownTimer1 ( )
}
if ( mRoomInfoResp !! . hour _ranking _open == 1 ) {
mBinding !! . clXsb . visibility = View . VISIBLE
} else {
mBinding !! . clXsb . visibility = View . GONE
}
}
@@ -761,18 +779,18 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
fun onRoomTaskEvent ( event : RoomTaskEvent ? ) {
if ( taskId != null && taskId != " 9 " ) { //这是每日任务完成发送私聊信息的事件
RetrofitClient . getInstance ( ) . dailyTasksComplete ( taskId , object : BaseObserver < RoomSingleton ? > ( ) {
override fun onSubscribe ( d : Disposable ) {
}
override fun onSubscribe ( d : Disposable ) {
}
override fun onNext ( roomSingleton : RoomSingleton ) {
number ++
// 这里处理请求结果
if ( roomSingleton . is _completed == 1 ) {
// 任务完成,可以做一些后续操作
taskId = null
}
override fun onNext ( roomSingleton : RoomSingleton ) {
number ++
// 这里处理请求结果
if ( roomSingleton . is _completed == 1 ) {
// 任务完成,可以做一些后续操作
taskId = null
}
} )
}
} )
}
}
@@ -847,11 +865,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
mBinding !! . drvRed . visibility = View . GONE
mBinding !! . redBj . setOnClickListener {
if ( qxRedPacketManager !! . getAllRedPackets ( ) . size == 1 ) {
if ( qxRedPacketManager !! . getAllRedPackets ( ) . size == 1 ) {
redPacketInfo = qxRedPacketManager !! . getAllRedPackets ( ) . get ( 0 )
if ( qxRedPacketManager !! . getAllRedPackets ( ) . get ( 0 ) != null && qxRedPacketManager !! . getAllRedPackets ( ) . get ( 0 ) . is _qiang == 1 ) {
ARouter . getInstance ( ) . build ( ARouteConstants . ROOM _RED _RESULT ) . withString ( " redpacketId " , qxRedPacketManager !! . getAllRedPackets ( ) . get ( 0 ) . getRedpacket _id ( ) ) . navigation ( ) ;
} else {
if ( qxRedPacketManager !! . getAllRedPackets ( ) . get ( 0 ) != null && qxRedPacketManager !! . getAllRedPackets ( )
. get( 0 ) . is _qiang == 1
) {
ARouter . getInstance ( ) . build ( ARouteConstants . ROOM _RED _RESULT )
. withString ( " redpacketId " , qxRedPacketManager !! . getAllRedPackets ( ) . get ( 0 ) . getRedpacket _id ( ) )
. navigation ( ) ;
} else {
redEnvelopesFragment = RedEnvelopesFragment ( this @RoomActivity )
redEnvelopesFragment !! . setIsCollectedRoom ( mRoomUserBean !! . is _collect == 1 )
redEnvelopesFragment !! . setFromToComment ( false )
@@ -866,9 +888,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
override fun onRedPacketClick ( redPacketInfos : RedPacketInfo ? , position : Int ) {
redPacketInfo = redPacketInfos
if ( redPacketInfos != null && redPacketInfos . is _qiang == 1 ) {
ARouter . getInstance ( ) . build ( ARouteConstants . ROOM _RED _RESULT ) . withString ( " redpacketId " , redPacketInfos . getRedpacket _id ( ) ) . navigation ( ) ;
} else {
if ( redPacketInfos != null && redPacketInfos . is _qiang == 1 ) {
ARouter . getInstance ( ) . build ( ARouteConstants . ROOM _RED _RESULT )
. withString ( " redpacketId " , redPacketInfos . getRedpacket _id ( ) ) . navigation ( ) ;
} else {
redEnvelopesFragment = RedEnvelopesFragment ( this @RoomActivity )
redEnvelopesFragment !! . setIsCollectedRoom ( mRoomUserBean !! . is _collect == 1 )
redEnvelopesFragment !! . setFromToComment ( false )
@@ -917,7 +940,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
ThreadUtils . runOnUiThreadDelayed ( {
val fragment = RechargeDialogFragment . show (
roomId , null ,
supportFragmentManager , " " , " "
supportFragmentManager , " " , " "
)
if ( fragment != null ) {
addActiveDialogFragment ( fragment ) // 添加到管理列表
@@ -954,7 +977,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
ThreadUtils . runOnUiThreadDelayed ( {
val fragment = RechargeDialogFragment . show (
roomId , null ,
supportFragmentManager , " " , " "
supportFragmentManager , " " , " "
)
if ( fragment != null ) {
addActiveDialogFragment ( fragment ) // 添加到管理列表
@@ -1351,16 +1374,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
// giftManager.receiveGift(giftBean)
// }
// }else {
if ( messageEvent !! . text . giftInfo != null ) {
var giftBean = messageEvent . text . giftInfo
giftBean . nickname = messageEvent . text . fromUserInfo . nickname
giftBean . userAvatar = messageEvent . text . fromUserInfo . avatar
LogUtils . e ( " 1005 " , messageEvent . text . toUserInfo ?. nickname )
giftBean . senderName = messageEvent . text . toUserInfo ?. nickname
giftBean . senderAvatarUrl = messageEvent . text . toUserInfo ?. avatar
giftBean . number = messageEvent . text . gift _num . toInt ( )
giftManager . receiveGift ( giftBean )
}
if ( messageEvent !! . text . giftInfo != null ) {
var giftBean = messageEvent . text . giftInfo
giftBean . nickname = messageEvent . text . fromUserInfo . nickname
giftBean . userAvatar = messageEvent . text . fromUserInfo . avatar
LogUtils . e ( " 1005 " , messageEvent . text . toUserInfo ?. nickname )
giftBean . senderName = messageEvent . text . toUserInfo ?. nickname
giftBean . senderAvatarUrl = messageEvent . text . toUserInfo ?. avatar
giftBean . number = messageEvent . text . gift _num . toInt ( )
GiftDisplayManager . getInstance ( ) . receiveGift ( giftBean )
}
// }
hand1005 ( messageEvent , text )
} else if ( msgType == 123 ) {
@@ -1495,10 +1518,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if ( messageEvent . text . xlh _data != null ) {
if ( messageEvent . text . xlh _data . status == 1 ) {
mBinding !! .xlhRk .visibility = View . VISIBLE
mBinding ? .xlhRk ? .visibility = View . VISIBLE
xlhDjs ( messageEvent . text . xlh _data . end _time )
} else {
mBinding !! .xlhRk .visibility = View . INVISIBLE
mBinding ? .xlhRk ? .visibility = View . INVISIBLE
releaseCountDownTimer1 ( )
}
}
@@ -1515,7 +1538,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
} else if ( msgType == 1060 ) {
qxRedPacketManager !! . addRedPacket ( messageEvent . text . redpacketInfo )
} else if ( msgType == 1061 ) {
} else if ( msgType == 1061 ) {
qxRedPacketManager !! . removeRedPacket ( messageEvent . text . redpacket _id )
}
}
@@ -1523,17 +1546,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
@Subscribe ( threadMode = ThreadMode . MAIN )
fun onMessageEvent ( messageEvent : MqttXlhEnd ) {
val xlhBean : XLHBean = GsonUtils . fromJson < XLHBean > ( messageEvent . message , XLHBean :: class . java )
if ( xlhBean . from _type == 100 ) {
if ( xlhBean . from _type == 100 ) {
if ( xlhBean . xlh _data != null ) {
if ( xlhBean . xlh _data . status == 1 ) {
mBinding !! .xlhRk .visibility = View . VISIBLE
mBinding ? .xlhRk ? .visibility = View . VISIBLE
xlhDjs ( xlhBean . xlh _data . end _time )
} else {
mBinding !! .xlhRk .visibility = View . INVISIBLE
mBinding ? .xlhRk ? .visibility = View . INVISIBLE
releaseCountDownTimer1 ( )
}
}
} else if ( xlhBean . from _type == 103 ) {
} else if ( xlhBean . from _type == 103 ) {
val existingFragment =
supportFragmentManager . findFragmentByTag ( " TourClubDialogFragment " ) as TourClubDialogFragment ?
if ( existingFragment != null && existingFragment . isVisible ) {
@@ -1543,7 +1566,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
// EventBus.getDefault().post(messageEvent)
}
xlhDjs ( xlhBean . end _time )
} else if ( xlhBean . from _type == 104 ) {
} else if ( xlhBean . from _type == 104 ) {
}
}
@@ -1591,7 +1614,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
setTime ( time1 )
// mBinding.tvDjs.setText(time1 + "");
if ( time1 == 0 ) {
mBinding !! .xlhRk .visibility = View . INVISIBLE
mBinding ? .xlhRk ? .visibility = View . INVISIBLE
}
}
@@ -1615,7 +1638,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
@SuppressLint ( " DefaultLocale " )
fun setTime ( seconds : Int ) {
if ( seconds == 0 ) {
mBinding !! .xlhRk .visibility = View . INVISIBLE
mBinding ? .xlhRk ? .visibility = View . INVISIBLE
return
}
val formattedTime = formatTime ( seconds )
@@ -2607,17 +2630,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
} else if ( id == R . id . ll _input ) {
mBinding !! . llInput . visibility = View . GONE
mBinding !! . inputMenu1 . dismiss ( )
} else if ( id == R . id . iv _emoji ) {
} else if ( id == R . id . iv _emoji ) {
val emotionPickerDialog = EmotionPickerDialog ( this )
emotionPickerDialog . setOnEmotionSelectedListener { emotion ->
// 处理选中的表情
if ( publicScreenFragment != null ) {
if ( publicScreenFragment != null ) {
publicScreenFragment !! . sendChatEmoji ( emotion )
}
}
emotionPickerDialog . show ( )
}
else if ( id == R . id . iv _chat ) {
} else if ( id == R . id . iv _chat ) {
if ( mRoomInfoResp !! . user _info . is _mute == " 1 " ) {
ToastUtils . show ( " 您已经被禁言 " )
} else {
@@ -2832,7 +2854,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
appStateListener !! . isAppInBackground = true
}
QXGiftPlayerManager . getInstance ( applicationContext ) . destroyEffectSvga ( )
ARouter . getInstance ( )
. build ( ARouteConstants . ME )
. navigation ( )
@@ -3108,7 +3129,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
@SuppressLint ( " MissingInflatedId " )
fun dialogDismiss ( type : Int ) {
fun dialogDismiss ( type : Int ) {
// // 使用 AlertDialog.Builder
val builder = AlertDialog . Builder ( this )
@@ -3159,14 +3180,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
etContent . setText ( " " )
countDownTimer ( )
if ( type == 2 ) {
if ( redPacketInfo != null ) {
LogUtils . e ( " 输入口令红包 " , redPacketInfo )
LogUtils . e ( " 输入口令红包 " , " # 口令红包 " + redPacketInfo !! . password , " inputSting " , inputSting )
if ( intRed _num == null || intRed _num !! . isEmpty ( ) ) {
if ( type == 2 ) {
if ( redPacketInfo != null ) {
LogUtils . e ( " 输入口令红包 " , redPacketInfo )
LogUtils . e ( " 输入口令红包 " , " # 口令红包 " + redPacketInfo !! . password , " inputSting " , inputSting )
if ( intRed _num == null || intRed _num !! . isEmpty ( ) ) {
return @OnClickListener
}
if ( inputSting !! . toString ( ) == intRed _num . toString ( ) ) {
if ( inputSting !! . toString ( ) == intRed _num . toString ( ) ) {
if ( redEnvelopesFragment != null ) {
redEnvelopesFragment = RedEnvelopesFragment ( this @RoomActivity )
redEnvelopesFragment !! . setIsCollectedRoom ( mRoomUserBean !! . is _collect == 1 )
@@ -3193,7 +3214,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
// 监听对话框关闭事件
dialog . setOnDismissListener {
// 对话框关闭时执行的代码
inputSting = " "
inputSting = " "
LogUtils . e ( " AlertDialog已关闭 " )
}
dialog . show ( )
@@ -3228,11 +3249,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
@Subscribe ( threadMode = ThreadMode . MAIN )
fun roomInfoEvent ( messageEvent : UserInfo ) {
if ( messageEvent != null && messageEvent . red _num != null ) {
inputSting = " # 口令红包 " + messageEvent . red _num
intRed _num = " # 口令红包 " + messageEvent . red _num
inputSting = " # 口令红包 " + messageEvent . red _num
intRed _num = " # 口令红包 " + messageEvent . red _num
dialogDismiss ( 2 )
} else if ( messageEvent != null && messageEvent . ta != null ) {
intRed _num = " "
} else if ( messageEvent != null && messageEvent . ta != null ) {
intRed _num = " "
inputSting = " @ " + messageEvent . nickname
dialogDismiss ( 1 )
}
@@ -3372,10 +3393,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
setupEffectView ( )
if ( mRoomInfoResp !! . gift _cycle != null && mRoomInfoResp !! . gift _cycle . xlh _info != null && mRoomInfoResp !! . gift _cycle . xlh _info . xlh _status != null && mRoomInfoResp !! . gift _cycle . xlh _info . xlh _status == " 1 " ) {
mBinding !! .xlhRk .visibility = View . VISIBLE
mBinding ? .xlhRk ? .visibility = View . VISIBLE
xlhDjs ( mRoomInfoResp !! . gift _cycle . xlh _info . end _time )
} else {
mBinding !! .xlhRk .visibility = View . INVISIBLE
mBinding ? .xlhRk ? .visibility = View . INVISIBLE
releaseCountDownTimer1 ( )
}
@@ -3688,9 +3709,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
override fun onResume ( ) {
super . onResume ( )
if ( true )
return
LogUtils . e ( " RoomActivity " , " onResume " )
GiftDisplayManager . getInstance ( ) . setupDisplayView ( mBinding ?. giftContainer )
CommonAppContext . getInstance ( ) . isShow = true
CommonAppContext . getInstance ( ) . isPlaying = true
CommonAppContext . getInstance ( ) . isRoomJoininj = false
@@ -3698,8 +3717,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
userLeaving = true
MvpPre !! . roomRedPackets ( roomId ) ;
if ( ( mRoomInfoResp ?. room _info ?. type _id . equals ( " 1 " ) || mRoomInfoResp ?. room _info ?. type _id . equals ( " 8 " ) || mRoomInfoResp ?. room _info ?. type _id . equals ( " 3 " )
|| mRoomInfoResp ?. room _info ?. type _id . equals ( " 4 " ) ) && mRoomInfoResp ?. room _info ?. label _id . equals ( " 2 " ) ) {
LogUtils . e ( " RoomActivity " , " onResume " )
if ( ( mRoomInfoResp ?. room _info ?. type _id . equals ( " 1 " ) || mRoomInfoResp ?. room _info ?. type _id . equals ( " 8 " ) || mRoomInfoResp ?. room _info ?. type _id . equals (
" 3 "
)
|| mRoomInfoResp ?. room _info ?. type _id . equals ( " 4 " ) ) && mRoomInfoResp ?. room _info ?. label _id . equals ( " 2 " )
) {
return
}
if ( isInBackground ) {
@@ -3715,11 +3739,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
resumeRoomState ( )
setupEffectView ( )
MvpPre !! .postRoomInfo ( CommonAppContext . getInstance ( ) . playId )
MvpPre ? .postRoomInfo ( CommonAppContext . getInstance ( ) . playId )
}
// 延迟调整布局,确保视图已经完全加载
mBinding !! .mainContentContainer .post { this . adjustLayoutHeights ( ) }
mBinding ? .mainContentContainer ? .post { this . adjustLayoutHeights ( ) }
}
// 添加检查房间连接状态的方法
@@ -4198,7 +4222,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if ( qxRedPacketManager != null ) {
qxRedPacketManager !! . destroyRedpacketInfo ( )
}
g iftManager . clearAll ( )
G iftDisplayManager . getInstance ( ) . clearAll ( )
mBinding !! . giftContainer . removeAllViews ( )
// 确保父类的 onDestroy 被调用
super . finish ( )
@@ -4559,7 +4583,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if ( redEnvelopesFragment != null && redEnvelopesFragment !! . mRedPacketInfo != null && redEnvelopesFragment !! . mRedPacketInfo !! . countdown > 0 ) {
if ( redEnvelopesFragment !! . mRedPacketInfo . type == 1 ) {
redEnvelopesFragment !! . changeViewType ( RedEnvelopeStatus . QXRedBagDrawTypeOpen )
} else {
} else {
if ( redEnvelopesFragment !! . isFromToComment ) {
redEnvelopesFragment !! . changeViewType ( RedEnvelopeStatus . QXRedBagDrawTypeOpen )
}
@@ -4577,13 +4601,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if ( redEnvelopesFragment !! . mRedPacketInfo . conditions . contains ( " 1 " ) ) {
//有收藏房间条件
if ( mRoomInfoResp !! . user _info . is _collect == 1 ) {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
//需要满足收藏在倒计时
redEnvelopesFragment !! . setNeedTime ( packetTime )
}
}
} else {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
redEnvelopesFragment !! . setNeedTime ( packetTime )
}
}
@@ -4592,12 +4616,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if ( redEnvelopesFragment !! . mRedPacketInfo . conditions . contains ( " 1 " ) ) {
//有收藏房间条件
if ( mRoomInfoResp !! . user _info . is _collect == 1 ) {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
redEnvelopesFragment !! . setNeedTime ( packetTime )
}
}
} else {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
if ( packet !! . redpacket _id == redEnvelopesFragment !! . mRedPacketInfo . redpacket _id ) {
redEnvelopesFragment !! . setNeedTime ( packetTime )
}
}