[BugFix]修复个播bug

This commit is contained in:
wushaocheng
2023-03-24 15:17:14 +08:00
parent 6871f588c8
commit 25ef12ed02
4 changed files with 7 additions and 48 deletions

View File

@@ -1,44 +0,0 @@
/*
* Copyright (C) 2015 Jake Wharton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yizhuan.erban.ui.gift.util;
import android.os.Looper;
public final class Preconditions {
public static void checkArgument(boolean assertion, String message) {
if (!assertion) {
throw new IllegalArgumentException(message);
}
}
public static <T> T checkNotNull(T value, String message) {
if (value == null) {
throw new NullPointerException(message);
}
return value;
}
public static void checkUiThread() {
if (Looper.getMainLooper() != Looper.myLooper()) {
throw new IllegalStateException(
"Must be called from the main thread. Was: " + Thread.currentThread());
}
}
private Preconditions() {
throw new AssertionError("No instances.");
}
}

View File

@@ -871,7 +871,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
AvRoomDataManager.get().isDatingVipMic(micPosition);
//超管逻辑
if (SuperAdminUtil.isSuperAdmin()) {
buttonItems.add(createGiveGiftMicItem());//添加送礼物按钮
if(isMySelf) {
buttonItems.add(createGiveGiftMicItem());//添加送礼物按钮
}
if (isTargetOnMic) {
if (isMySelf) {
buttonItems.add(createDownMicItem());
@@ -925,7 +927,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
}
//解锁麦
if (micPosition != AvRoomDataManager.POSITON_NOT_ON_MIC) {
if (roomMicInfo != null) {
if (roomMicInfo != null && !AvRoomDataManager.get().isSingleRoom()) {
if (roomMicInfo.isMicLock()) {
buttonItems.add(createUnLockMicItem(micPosition));
} else {
@@ -968,9 +970,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
}
return buttonItems;
} else if (AvRoomDataManager.get().isRoomAdmin()) {
buttonItems.add(createGiveGiftMicItem());//添加送礼物按钮
//管理员操作
if (isMySelf) {
buttonItems.add(createGiveGiftMicItem());//添加送礼物按钮
//开闭麦
if (micPosition != AvRoomDataManager.POSITON_NOT_ON_MIC) {
if (roomMicInfo != null) {

View File

@@ -1067,6 +1067,7 @@
<string name="square_dynamic_page">廣場動態頁_推薦_點擊話題</string>
<string name="topic_page_is_displayed">進入話題客態頁:動態廣場</string>
<string name="room_contribute_list">房間榜</string>
<string name="room_host_list">主播榜</string>
<string name="room_list_hour">小時榜</string>
<string name="room_guest_to_communicate">嘉賓交流</string>
<string name="room_move_the_candidates">心動選人</string>

View File

@@ -107,7 +107,7 @@
android:paddingStart="@dimen/dp_8"
android:paddingEnd="@dimen/dp_4"
android:layout_marginTop="85dp"
android:text="@string/room_contribute_list"
android:text="@string/room_host_list"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
app:layout_constraintTop_toTopOf="parent"