修改已经连麦列表无名称问题,修改连麦列表覆盖问题,添加主播关播强制关闭连麦权限

This commit is contained in:
18401019693 2023-11-01 16:05:22 +08:00
parent 9bdee649d8
commit 21473b1d69
3 changed files with 27 additions and 14 deletions

View File

@ -32,23 +32,32 @@ public class MicUserManager extends BaseCacheManager {
}
public void upDataMicUser(JSONObject map) {
UserBean userModel = new UserBean();
boolean isHave = false;
for (int i = 0; i < micUsers.size(); i++) {
if (TextUtils.equals(micUsers.get(i).getId(), map.getString("uid"))) {
isHave = true;
}
}
if (!isHave){
UserBean userModel = new UserBean();
UserBean.DressBean dressAvatar = null;
if (!TextUtils.isEmpty(map.getString("dress_avatar"))) {
dressAvatar = new UserBean.DressBean();
dressAvatar.setAvatar_frame(map.getString("dress_avatar"));
UserBean.DressBean dressAvatar = null;
if (!TextUtils.isEmpty(map.getString("dress_avatar"))) {
dressAvatar = new UserBean.DressBean();
dressAvatar.setAvatar_frame(map.getString("dress_avatar"));
}
userModel.setAvatar(map.getString("avatar"));
userModel.setId(map.getString("uid"));
userModel.setUserNiceName(map.getString("uname"));
userModel.setDress(dressAvatar);
userModel.setSex(map.getIntValue("sex"));
userModel.setLevel(map.getIntValue("level"));
userModel.setTypeMic(2);
micUsers.add(userModel);
put(micKey, micUsers);
}
userModel.setAvatar(map.getString("avatar"));
userModel.setId(map.getString("uid"));
userModel.setUserNiceName(map.getString("uname"));
userModel.setDress(dressAvatar);
userModel.setSex(map.getIntValue("sex"));
userModel.setLevel(map.getIntValue("level"));
userModel.setTypeMic(2);
micUsers.add(userModel);
put(micKey, micUsers);
}
public List<UserBean> getMicUserList() {

View File

@ -874,6 +874,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
MicStatusManager.getInstance().closeMic(mContext);
MicedUserManager.get().removeAllMicUserList();
MicUserManager.get().removeAllMicUserList();
PKing = false;

View File

@ -679,6 +679,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
mVideoView.requestLayout();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onUpdata(String str) {
if ("UsertoRY".equals(str)) {
@ -686,8 +687,10 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
@Override
public void onConfirmClick(Dialog dialog, String content) {
UsertoRY();
dialog = null;
}
});
} else if ("inviteMic".equals(str)) {
String content = "邀請您進行語音連麥";
String confirm = "接受";