feat:處理底部按鈕顯示邏輯

This commit is contained in:
max
2024-07-25 18:31:50 +08:00
parent 178f4e24ef
commit 3ea7aecd5c
2 changed files with 17 additions and 2 deletions

View File

@@ -665,6 +665,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
bottomView.showHomePartyDownMicBottom()
}
bottomView.showInputOrIcon(isOnMic)
bottomView.updateGameEntrance()
// 更新聽筒消息
bottomView.setRemoteMuteOpen(!AudioEngineManager.get().isRemoteMute)
if (isOnMic) {

View File

@@ -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);