|
@@ -5,7 +5,6 @@ import android.graphics.Rect
|
|
|
import android.text.TextUtils
|
|
|
import android.util.Log
|
|
|
import android.view.View
|
|
|
-import android.view.ViewGroup
|
|
|
import android.widget.ImageView
|
|
|
import android.widget.TextView
|
|
|
import android.widget.Toast
|
|
@@ -26,7 +25,6 @@ import com.liulishuo.okdownload.core.cause.ResumeFailedCause
|
|
|
import com.permissionx.guolindev.PermissionX
|
|
|
import com.swago.baseswago.PersonDataDFragment
|
|
|
import com.swago.baseswago.UserVm
|
|
|
-import com.swago.baseswago.agora.AgoraManager
|
|
|
import com.swago.baseswago.baseroom.*
|
|
|
import com.swago.baseswago.constant.ARouteConstant
|
|
|
import com.swago.baseswago.constant.UrlConstant
|
|
@@ -60,8 +58,6 @@ import com.swago.room.databinding.FragmentBaseComBinding
|
|
|
import com.swago.room.dialog.AudienceListDialog
|
|
|
import com.swago.room.dialog.FanClubAnchorDialog
|
|
|
import com.swago.room.dialog.FanClubForUserDialog
|
|
|
-import com.swago.room.dialog.FooterMoreDialog
|
|
|
-import com.swago.room.dialog.HouseGoLiveDialog
|
|
|
import com.swago.room.dialog.JoinFanClubDialog
|
|
|
import com.swago.room.dialog.LevelUpDialog
|
|
|
import com.swago.room.dialog.MessageListDialog
|
|
@@ -80,7 +76,6 @@ import com.swago.room.inter.IFooter
|
|
|
import com.swago.room.inter.IHeader
|
|
|
import com.swago.room.lianmai.LianMaiVm
|
|
|
import com.swago.room.manager.JoinAnimalManager
|
|
|
-import com.swago.room.music.MyMusicDialog
|
|
|
import com.swago.room.piaotiao.WaftManager
|
|
|
import com.swago.room.pk.IPKListener
|
|
|
import com.swago.room.pk.PKStateManager
|
|
@@ -97,7 +92,6 @@ import kotlinx.coroutines.CoroutineScope
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
import kotlinx.coroutines.GlobalScope
|
|
|
import kotlinx.coroutines.Job
|
|
|
-import kotlinx.coroutines.cancel
|
|
|
import kotlinx.coroutines.delay
|
|
|
import kotlinx.coroutines.isActive
|
|
|
import kotlinx.coroutines.launch
|
|
@@ -149,9 +143,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
val job = Job()
|
|
|
val coroutineScope = CoroutineScope(Dispatchers.Main + job)
|
|
|
|
|
|
- var dialog: SendMsgDialog? = null
|
|
|
var gameDialog: GamePlayDialog? = null
|
|
|
- var msgListDialog: MessageListDialog? = null
|
|
|
|
|
|
val gameList by lazy {
|
|
|
ArrayList<GameModel>()
|
|
@@ -649,7 +641,10 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
|
|
|
msgVm.joinRoomFun = {
|
|
|
//svg播放
|
|
|
- joinAnimalManager.addSvgUrl(it)
|
|
|
+ if (!it.androidJoinSpecial.isNullOrEmpty()){
|
|
|
+ joinAnimalManager.addSvgUrl(it)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
userVm.userInfoLiveData.observe(this) {
|
|
@@ -769,9 +764,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
|
|
|
override fun onDestroyView() {
|
|
|
super.onDestroyView()
|
|
|
- dialog = null
|
|
|
gameDialog = null
|
|
|
- msgListDialog = null
|
|
|
job.cancel()
|
|
|
PKStateManager.removePKListener(this)
|
|
|
activity?.let {
|
|
@@ -782,16 +775,15 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
}
|
|
|
|
|
|
fun openSendMessageDialog(atName: String = "") {
|
|
|
- dialog = SendMsgDialog.newInstance(atName)
|
|
|
- dialog?.addSenderMsgToRoomChatList = {
|
|
|
- addChatMsgToRv(it)
|
|
|
- }
|
|
|
- dialog?.show(childFragmentManager, "SendMsgDialog")
|
|
|
+ SendMsgDialog.newInstance(atName).apply {
|
|
|
+ this.addSenderMsgToRoomChatList = {
|
|
|
+ addChatMsgToRv(it)
|
|
|
+ }
|
|
|
+ }.show(childFragmentManager, "SendMsgDialog")
|
|
|
}
|
|
|
|
|
|
fun openMessageListDialog() {
|
|
|
- msgListDialog = MessageListDialog.newInstance()
|
|
|
- msgListDialog?.show(childFragmentManager, "MessageListDialog")
|
|
|
+ MessageListDialog.newInstance().show(childFragmentManager, "MessageListDialog")
|
|
|
}
|
|
|
|
|
|
private var gameIsOpen = false
|
|
@@ -922,9 +914,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
|
|
|
override fun leaveRoom(iRoomInfo: IRoomInfo) {
|
|
|
dataChatList.clear()
|
|
|
- dialog = null
|
|
|
gameDialog = null
|
|
|
- msgListDialog = null
|
|
|
chatAdapter.notifyDataSetChanged()
|
|
|
if (iRoomInfo.getRoomType() == RoomType.AUDIO.type){
|
|
|
val data = ArrayList<AudioSeatModel>()
|
|
@@ -935,6 +925,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
|
|
|
override fun closeRoomed() {
|
|
|
binding.likeLayout.clear()
|
|
|
+ gameDialog = null
|
|
|
RoomTimer.timeTickList.remove(this)
|
|
|
}
|
|
|
|