|
@@ -230,8 +230,11 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
}
|
|
|
//飘条
|
|
|
msgVm.waftFun = {
|
|
|
- if (it is GamePrize && roomConfig?.is_show_game == 1){
|
|
|
- waftManager.addNewMessage(it)
|
|
|
+ //如果是游戏飘条 要判断游戏列表是否有数据有则展示游戏飘条
|
|
|
+ if (it is GamePrize){
|
|
|
+ if (gameList.isNotEmpty()){
|
|
|
+ waftManager.addNewMessage(it)
|
|
|
+ }
|
|
|
}else{
|
|
|
waftManager.addNewMessage(it)
|
|
|
}
|
|
@@ -261,6 +264,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
//游戏列表
|
|
|
roomVm.gameListModelLiveData.observe(this){
|
|
|
it.game?.let { gameData ->
|
|
|
+ iFooter.setGameIcon(gameData.isNotEmpty())
|
|
|
gameList.addAll(gameData)
|
|
|
}
|
|
|
}
|
|
@@ -268,7 +272,6 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
//直播间配置
|
|
|
roomVm.roomConfigLiveData.observe(this){
|
|
|
this.roomConfig = it
|
|
|
- iFooter.setGameIcon(it.is_show_game==1)
|
|
|
//轮播图
|
|
|
binding.bannerView.setData(it.banners)
|
|
|
binding.bannerView.jumpToWebFun = { banner ->
|
|
@@ -420,7 +423,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
|
|
|
lifecycleScope.launch(Dispatchers.Main){
|
|
|
delay(2000)
|
|
|
roomConfig?.let {
|
|
|
- if (it.is_show_game==1&&it.auto_show_game==1){
|
|
|
+ if (gameList.isNotEmpty()&&it.auto_show_game==1){
|
|
|
if (it.is_repeat_game==1){
|
|
|
//多次弹出游戏
|
|
|
setGameDefaultData(0)
|