diff --git a/app/src/main/java/com/chwl/app/avroom/fragment/BaseRoomFragment.kt b/app/src/main/java/com/chwl/app/avroom/fragment/BaseRoomFragment.kt index a8ed75e6b..b40402a93 100644 --- a/app/src/main/java/com/chwl/app/avroom/fragment/BaseRoomFragment.kt +++ b/app/src/main/java/com/chwl/app/avroom/fragment/BaseRoomFragment.kt @@ -665,6 +665,7 @@ open class BaseRoomFragment?> : bottomView.showHomePartyDownMicBottom() } bottomView.showInputOrIcon(isOnMic) + bottomView.updateGameEntrance() // 更新聽筒消息 bottomView.setRemoteMuteOpen(!AudioEngineManager.get().isRemoteMute) if (isOnMic) { diff --git a/app/src/main/java/com/chwl/app/avroom/widget/BottomView.java b/app/src/main/java/com/chwl/app/avroom/widget/BottomView.java index 905689b90..2c149665a 100644 --- a/app/src/main/java/com/chwl/app/avroom/widget/BottomView.java +++ b/app/src/main/java/com/chwl/app/avroom/widget/BottomView.java @@ -16,7 +16,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.PopupWindow; import android.widget.TextView; - +import com.chwl.core.manager.AvRoomDataManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -75,6 +75,8 @@ public class BottomView extends LinearLayout implements View.OnClickListener { private ImageView iconRoomBaiShunGame; + private ImageView pkGameView; + @Nullable private PopupWindow msgTipPopupWindow; @NonNull @@ -111,7 +113,7 @@ public class BottomView extends LinearLayout implements View.OnClickListener { iconMicQueue = (ImageView) findViewById(R.id.icon_mic_queue); iconRoomMsg = findViewById(R.id.iv_room_message); - ImageView pkGameView = findViewById(R.id.icon_room_PK_game); + pkGameView = findViewById(R.id.icon_room_PK_game); openMic.setOnClickListener(this); sendMsgInput.setOnClickListener(this); sendFace.setOnClickListener(this); @@ -258,6 +260,18 @@ public class BottomView extends LinearLayout implements View.OnClickListener { micLayout.setVisibility(VISIBLE); } + public void updateGameEntrance() { + if (AvRoomDataManager.get().isManager() || SuperAdminUtil.isSuperAdmin()) { + if (!AvRoomDataManager.get().isCpRoom()) { + pkGameView.setVisibility(VISIBLE); + iconRoomBaiShunGame.setVisibility(VISIBLE); + } + } else { + pkGameView.setVisibility(GONE); + iconRoomBaiShunGame.setVisibility(GONE); + } + } + public void showHomePartyDownMicBottom() { faceLayout.setVisibility(GONE); micLayout.setVisibility(GONE);