1:修改BUG
This commit is contained in:
@@ -786,7 +786,7 @@ public class AgoraManager {
|
||||
VD_1280x720,
|
||||
FRAME_RATE_FPS_15,
|
||||
STANDARD_BITRATE,
|
||||
ORIENTATION_MODE_FIXED_LANDSCAPE
|
||||
ORIENTATION_MODE_ADAPTIVE
|
||||
));
|
||||
rtcEngine.startScreenCapture(screenCaptureParameters);
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_40">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="@dimen/dp_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -354,7 +354,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
LogUtils.e("lxj", "开始时间:" + TimeUtils.date2String(Date()))
|
||||
|
||||
if (taskId != null) {
|
||||
if (taskId == "9") {
|
||||
if (taskId == "9" || taskId == "8") {
|
||||
MyRoomSingleton.getInstance().onEnterRoom(taskId)
|
||||
}
|
||||
}
|
||||
@@ -1694,6 +1694,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 房间类型切换
|
||||
private fun handleMsgType1012() {
|
||||
if (customMusicFloatingView != null) {
|
||||
customMusicFloatingView!!.destroy()
|
||||
@@ -3370,12 +3371,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.ivQuanC.setOnClickListener { v: View? ->
|
||||
if (mRoomInfoResp?.room_info?.head_line?.room_id != null && mRoomInfoResp?.room_info?.head_line?.room_id!!.isNotEmpty()) {
|
||||
if (mRoomInfoResp?.room_info?.head_line?.room_id != roomId) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(
|
||||
applicationContext,
|
||||
mRoomInfoResp?.room_info?.head_line?.room_id,
|
||||
"",
|
||||
null
|
||||
)
|
||||
// RoomManager.getInstance().fetchRoomDataAndEnter(
|
||||
// applicationContext,
|
||||
// mRoomInfoResp?.room_info?.head_line?.room_id,
|
||||
// "",
|
||||
// null
|
||||
// )
|
||||
MessageListenerSingleton.getInstance()
|
||||
.joinGroup(mRoomInfoResp?.room_info?.head_line?.room_id)
|
||||
MvpPre?.getRoomIn(mRoomInfoResp?.room_info?.head_line?.room_id, "")
|
||||
} else {
|
||||
com.blankj.utilcode.util.ToastUtils.showLong("您就在当前房间")
|
||||
}
|
||||
@@ -3552,7 +3556,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
is RoomTaskEvent -> {
|
||||
if (taskId != null && taskId != "9") { //这是每日任务完成发送私聊信息的事件
|
||||
if (taskId != null && taskId != "9" && taskId !="8") { //这是每日任务完成发送私聊信息的事件
|
||||
RetrofitClient.getInstance()
|
||||
.dailyTasksComplete(taskId, object : BaseObserver<RoomSingleton?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
@@ -3644,7 +3648,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
roomId2 = event.room_id
|
||||
|
||||
MessageListenerSingleton.getInstance().joinGroup(event.room_id)
|
||||
MvpPre?.getRoomIn(event.room_id, "")
|
||||
}
|
||||
|
||||
|
||||
@@ -406,6 +406,9 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
mBinding.wvZc.setRoomWheatNumber("9");
|
||||
mBinding.wvZc.isMentorShip(true);
|
||||
mBinding.wvZc.setData(roomPitBean);
|
||||
if (roomPitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
upMike(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
adapter.setNewData(roomPitBeans);
|
||||
@@ -460,7 +463,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
if (mBinding.wvZc.getUserId() != null && !mBinding.wvZc.getUserId().equals("0") && !mBinding.wvZc.getUserId().equals("") && mBinding.wvZc.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
mBinding.imQg.setVisibility(VISIBLE);
|
||||
}
|
||||
setMike();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -478,29 +480,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
|
||||
}
|
||||
|
||||
// TODO: 2025/12/4 判断麦克风是否显示
|
||||
private void setMike(){
|
||||
|
||||
try {
|
||||
for (int i=0;i<roomPitBeans.size();i++){
|
||||
if (roomPitBeans.get(i).getUser_id().equals(SpUtil.getUserId()+"")
|
||||
|| roomInfoResp.getSinger_info().getSong_info().getSinger_user_id()==SpUtil.getUserId()){
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setrlMic(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setrlMic(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void event1003(RoomMessageEvent messageEvent) {
|
||||
UserInfo fromUserInfo = messageEvent.getText().getFromUserInfo();
|
||||
@@ -553,6 +532,13 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
LogUtils.e("juke", e.getMessage());
|
||||
pitBean.setImageType(false);
|
||||
}
|
||||
if (pitBean.getUser_id().equals(SpUtil.getUserId()+"")){
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setrlMic(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 使用set方法更新数据,然后通知适配器
|
||||
roomPitBeans.set(position, pitBean);
|
||||
@@ -566,15 +552,24 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
configGameOptionBtn();
|
||||
}
|
||||
}
|
||||
setMike();
|
||||
}
|
||||
|
||||
/// 配置操作按钮
|
||||
private void configGameOptionBtn() {
|
||||
if (myPitNumber == 9) {
|
||||
mBinding.imQg.setVisibility(VISIBLE);
|
||||
if (getActivity() != null) {
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setrlMic(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBinding.imQg.setVisibility(GONE);
|
||||
if (getActivity() != null) {
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setrlMic(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,6 +624,13 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
// 使用set方法更新数据,然后通知适配器
|
||||
roomPitBeans.set(position, pitBean);
|
||||
adapter.notifyItemChanged(position);
|
||||
if (SpUtil.getUserId() == userId) {
|
||||
if (getActivity() != null) {
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setrlMic(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (userId == SpUtil.getUserId()) {
|
||||
myPitNumber = 0;
|
||||
@@ -636,7 +638,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
configGameOptionBtn();
|
||||
}
|
||||
}
|
||||
setMike();
|
||||
}
|
||||
|
||||
public void event1039(RoomMessageEvent event) {
|
||||
@@ -688,7 +689,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
adapter.notifyItemChanged(toIndex);
|
||||
}
|
||||
LogUtils.e("huanmai2", mBinding.wvZc.pitBean);
|
||||
setMike();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -757,18 +757,8 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
mBinding.ciNetAva.setVisibility(GONE);
|
||||
mBinding.tvSong.setText("演唱歌曲:无");
|
||||
}
|
||||
setMike();
|
||||
}
|
||||
|
||||
// TODO: 2025/11/22 当有演唱者的时候,修改演唱者头像的大小
|
||||
private void setUserAvaSize(int size) {
|
||||
// 设置控件大小为50dp x 50dp
|
||||
// int sizeInPx = (int) (size * getResources().getDisplayMetrics().density + 0.5f);
|
||||
// ViewGroup.LayoutParams layoutParams = mBinding.ciUserAva.getLayoutParams();
|
||||
// layoutParams.width = sizeInPx;
|
||||
// layoutParams.height = sizeInPx;
|
||||
// mBinding.ciUserAva.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
// TODO: 2025/11/22 当在演唱位的时候,显示麦克风,当上麦的时候,也展示麦克风,
|
||||
private void upMike(boolean isBool) {
|
||||
@@ -797,7 +787,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
||||
adapter.notifyItemChanged(i);
|
||||
}
|
||||
}
|
||||
setMike();
|
||||
}
|
||||
|
||||
public void event1021(RoomMessageEvent messageEvent) {
|
||||
|
||||
@@ -287,8 +287,8 @@ class BosomFriendFragment : BaseMvpFragment<UserHomepagePresenter?, FragmentBoso
|
||||
// 只有在第一页或刷新时才更新cp数据
|
||||
if (!isLoadMore) {
|
||||
if (data.cp != null) {
|
||||
mBinding.tvHeartbeat.text =
|
||||
if (data.cp?.name.isNullOrEmpty()) "心动" else data.cp.name
|
||||
// mBinding.tvHeartbeat.text =
|
||||
// if (data.cp?.name.isNullOrEmpty()) "心动" else data.cp.name
|
||||
cpBean = data.cp
|
||||
if (data.cp.user_info1 != null && data.cp.user_info2 != null) {
|
||||
mBinding.llCp.visibility = View.VISIBLE
|
||||
|
||||
@@ -44,7 +44,7 @@ class RoomTalentDialog(context: Context, val roomId: String) :
|
||||
dismiss()
|
||||
}
|
||||
mBinding.tvQd.setOnClickListener {
|
||||
if (adapter?.getSelectedValue()?.isEmpty() == true) {
|
||||
if (adapter?.getSelectedValue()?.isEmpty() == true || adapter?.getSelectedValue()==null) {
|
||||
ToastUtils.show("请选择才艺")
|
||||
} else {
|
||||
var messageEvent =
|
||||
@@ -52,9 +52,10 @@ class RoomTalentDialog(context: Context, val roomId: String) :
|
||||
(ActivityUtils.getTopActivity() as? RoomActivity)?.let { roomActivity ->
|
||||
roomActivity.dialogMessage(messageEvent)
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -95,15 +95,15 @@ public class RoomManager {
|
||||
fetchAndJoinRoom(context, roomId, password, taskId);
|
||||
} else {
|
||||
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
||||
// MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
// exitRoom(CommonAppContext.getInstance().playId);
|
||||
// CommonAppContext.getInstance().isShow = false;
|
||||
// CommonAppContext.getInstance().isPlaying = false;
|
||||
// CommonAppContext.getInstance().isRoomJoininj = false;
|
||||
// EventBus.getDefault().post(new RoomOutEvent());
|
||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
exitRoom(CommonAppContext.getInstance().playId);
|
||||
CommonAppContext.getInstance().isShow = false;
|
||||
CommonAppContext.getInstance().isPlaying = false;
|
||||
CommonAppContext.getInstance().isRoomJoininj = false;
|
||||
EventBus.getDefault().post(new RoomOutEvent());
|
||||
|
||||
fetchAndJoinRoom(context, roomId, password, taskId);
|
||||
return;
|
||||
// fetchAndJoinRoom(context, roomId, password, taskId);
|
||||
// return;
|
||||
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
||||
upInfo(context, roomId, password, true, roomInfo, true, taskId);
|
||||
return;
|
||||
@@ -160,12 +160,12 @@ public class RoomManager {
|
||||
queren(resp.getRoom_id(),resp.getMsg());
|
||||
}else {
|
||||
|
||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
exitRoom(CommonAppContext.getInstance().playId);
|
||||
CommonAppContext.getInstance().isShow = false;
|
||||
CommonAppContext.getInstance().isPlaying = false;
|
||||
CommonAppContext.getInstance().isRoomJoininj = false;
|
||||
EventBus.getDefault().post(new RoomOutEvent());
|
||||
// MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
// exitRoom(CommonAppContext.getInstance().playId);
|
||||
// CommonAppContext.getInstance().isShow = false;
|
||||
// CommonAppContext.getInstance().isPlaying = false;
|
||||
// CommonAppContext.getInstance().isRoomJoininj = false;
|
||||
// EventBus.getDefault().post(new RoomOutEvent());
|
||||
|
||||
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId();
|
||||
String token = resp.getUser_info().getAgora_token(); // 如果启用了鉴权才需要
|
||||
|
||||
Reference in New Issue
Block a user