fix:修正个播房玩法入口布局
This commit is contained in:
@@ -547,14 +547,10 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
}
|
||||
}
|
||||
|
||||
if (AvRoomDataManager.get().isDatingMode()) {
|
||||
if (hasBaishunGames) {
|
||||
gameBinding.ivGame.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
gameBinding.ivGame.setVisibility(View.GONE);
|
||||
} else {
|
||||
if (hasBaishunGames) {
|
||||
gameBinding.ivGame.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
gameBinding.ivGame.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -99,48 +99,6 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
updateFansTeamInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
requestData()
|
||||
}
|
||||
|
||||
private fun requestData() {
|
||||
val dataService = get()!!.findAbility<RoomAbility>(
|
||||
RoomDataService::class.java.simpleName
|
||||
) as RoomDataService?
|
||||
val cacheKey = "gameplay_list#" + hashCode()
|
||||
val disposable = AvRoomModel.get().roomGamePlayList.doOnError {
|
||||
updateConfigButtonArea()
|
||||
}.subscribe { roomIcons ->
|
||||
dataService?.putData(cacheKey, roomIcons)
|
||||
hasBaishunGames = roomIcons.size > 0
|
||||
updateConfigButtonArea()
|
||||
}
|
||||
}
|
||||
|
||||
fun updateConfigButtonArea() {
|
||||
val configModel = AvRoomDataManager.get().rightBottomIconConfig
|
||||
if (configModel == null) {
|
||||
gameBinding.ivConfigEntrance.visibility = View.GONE
|
||||
} else {
|
||||
if (configModel.icon1Url == null) {
|
||||
gameBinding.ivConfigEntrance.visibility = View.GONE
|
||||
} else {
|
||||
ImageLoadUtils.loadAvatar(configModel.icon1Url, gameBinding.ivConfigEntrance)
|
||||
gameBinding.ivConfigEntrance.visibility = View.VISIBLE
|
||||
}
|
||||
if (configModel.icon2Url != null) {
|
||||
ImageLoadUtils.loadAvatar(configModel.icon2Url, gameBinding.ivGame)
|
||||
}
|
||||
}
|
||||
if (AvRoomDataManager.get().isDatingMode) {
|
||||
gameBinding.ivGame.visibility = View.GONE
|
||||
} else {
|
||||
if (hasBaishunGames) {
|
||||
gameBinding.ivGame.visibility = View.VISIBLE
|
||||
} else {
|
||||
gameBinding.ivGame.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onReceiveRoomEvent(roomEvent: RoomEvent?) {
|
||||
|
@@ -270,7 +270,7 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
pkGameView.setVisibility(GONE);
|
||||
iconRoomBaiShunGame.setVisibility(GONE);
|
||||
}
|
||||
if (AvRoomDataManager.get().isSingleRoom()) {
|
||||
if (AvRoomDataManager.get().isSingleRoom() || AvRoomDataManager.get().isDatingMode()) {
|
||||
pkGameView.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user