修改拍卖房结构,目前修改到拍卖者上麦下麦
This commit is contained in:
@@ -2,6 +2,7 @@ package com.example.moduleroom.activity;
|
||||
|
||||
import static android.app.PendingIntent.getActivity;
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import static com.liulishuo.okdownload.OkDownloadProvider.context;
|
||||
@@ -57,6 +58,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.contacts.RoomContacts;
|
||||
import com.example.moduleroom.databinding.ActivityRoomBinding;
|
||||
import com.example.moduleroom.dialog.CardRelationshipFragment;
|
||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet;
|
||||
import com.example.moduleroom.dialog.FriendsDialogFragment;
|
||||
import com.example.moduleroom.dialog.PublishCommentDialogFragment;
|
||||
@@ -83,6 +85,7 @@ import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.xscm.moduleutil.bean.room.FriendInfo;
|
||||
import com.xscm.moduleutil.bean.room.FriendUserBean;
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.bean.room.RoomOnline;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.databinding.RoomDialogMusicWindowOpenBinding;
|
||||
@@ -190,6 +193,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
||||
// 添加成员变量
|
||||
private boolean isLayoutAdjusted = false;
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
password = intent.getStringExtra("password");
|
||||
@@ -645,22 +649,35 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
musicPlayBean.setPosition(text.getPosition());
|
||||
EventBus.getDefault().post(musicPlayBean);
|
||||
} else if (messageEvent.getMsgType() == 1003) {//上麦操作
|
||||
//
|
||||
// RoomWheatEvent roomWheatEvent = new RoomWheatEvent();
|
||||
// roomWheatEvent.setRoomId(roomId);
|
||||
// roomWheatEvent.setOccupied(true);
|
||||
// EventBus.getDefault().post(roomWheatEvent);
|
||||
if (messageEvent.getText().getPit_number().equals("9") && messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||
}
|
||||
RoomPitBean pitBean = mRoomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(messageEvent.getText().getPit_number()) - 1);
|
||||
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(messageEvent.getText().getPit_number()) - 1, pitBean);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
aBoolean = false;
|
||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
setBoolean(aBoolean);
|
||||
mRoomInfoResp.getUser_info().setPit_number(messageEvent.getText().getPit_number() != null ? Integer.parseInt(messageEvent.getText().getPit_number()) : 0);
|
||||
setRoleType(3, Integer.parseInt(messageEvent.getText().getPit_number()));
|
||||
switchMic(2);
|
||||
}
|
||||
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {///拍卖房上麦操作
|
||||
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(0, getPitBean(messageEvent));
|
||||
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(messageEvent.getText().getPit_number()));
|
||||
|
||||
}
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||
RoomPitBean pitBean = mRoomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(messageEvent.getText().getPit_number()) - 1);
|
||||
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(messageEvent.getText().getPit_number()) - 1, pitBean);
|
||||
}
|
||||
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||
} else if (messageEvent.getMsgType() == 1004) {//下麦操作
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId() && messageEvent.getText().getPit_number().equals("9")) {
|
||||
@@ -671,15 +688,75 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
mBinding.roomTop.rl.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
RoomPitBean pitBean = mRoomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(messageEvent.getText().getPit_number()) - 1);
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
pitBean.setDress("");
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(messageEvent.getText().getPit_number()) - 1, pitBean);
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(0, getPitBean2(messageEvent, "9"));
|
||||
mRoomInfoResp.getUser_info().setPit_number(0);
|
||||
}
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
mRoomInfoResp.setRoom_auction(null);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
setRoleType(0, 0);
|
||||
switchMic(2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
RoomPitBean pitBean = mRoomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(messageEvent.getText().getPit_number()) - 1);
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
pitBean.setDress("");
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(messageEvent.getText().getPit_number()) - 1, pitBean);
|
||||
|
||||
}
|
||||
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// mBinding.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
aBoolean = true;
|
||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
setBoolean(aBoolean);
|
||||
mRoomInfoResp.getUser_info().setPit_number(0);
|
||||
setRoleType(0, 0);
|
||||
switchMic(2);
|
||||
}
|
||||
|
||||
|
||||
} else if (messageEvent.getMsgType() == 1022) {
|
||||
if (messageEvent.getText().getType() == 1) {//拍卖位上麦
|
||||
if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
mRoomInfoResp.getRoom_auction().setAuction_user(getPitBean3(messageEvent));
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
setRoleType(3, 888);
|
||||
switchMic(2);
|
||||
// parentFragment.setRoleType(3, 888);
|
||||
// parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
int type = -1; // 或其他默认值
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||
type = (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) ? 1 : 2;
|
||||
}
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
CardRelationshipFragment.show(mRoomInfoResp.getRoom_info().getRoom_id(), SpUtil.getUserId() + "", type+"", getSupportFragmentManager());
|
||||
}
|
||||
} else if (messageEvent.getText().getType() == 2) {//拍卖位下麦
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
mRoomInfoResp.getRoom_info().getPit_list().set(0, getPitBean2(messageEvent, "9"));
|
||||
mRoomInfoResp.getUser_info().setPit_number(0);
|
||||
setRoleType(0, 0);
|
||||
switchMic(2);
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
mRoomInfoResp.setRoom_auction(new RoomAuction());
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
setRoleType(0, 0);
|
||||
switchMic(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1020) {
|
||||
mRoomBean = messageEvent.getText().getRoomInfo();
|
||||
EventBus.getDefault().post(mRoomBean);
|
||||
@@ -801,6 +878,44 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
}
|
||||
|
||||
// TODO: 2025/6/30 上麦,麦位变化
|
||||
private RoomPitBean getPitBean(RoomMessageEvent messageEvent) {
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(messageEvent.getText().getPit_number());
|
||||
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
|
||||
return pitBean;
|
||||
}
|
||||
|
||||
// TODO: 2025/6/30 下麦麦位变化
|
||||
private RoomPitBean getPitBean2(RoomMessageEvent messageEvent, String number) {
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(messageEvent != null ? messageEvent.getText().getPit_number() : number);
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
pitBean.setIs_pm(1);
|
||||
return pitBean;
|
||||
}
|
||||
|
||||
// TODO: 2025/8/29 排麦位上麦
|
||||
private RoomAuction.AuctionUserBean getPitBean3(RoomMessageEvent messageEvent) {
|
||||
RoomAuction.AuctionUserBean roomAuction = new RoomAuction().getAuction_user();
|
||||
roomAuction.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||
roomAuction.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
roomAuction.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
roomAuction.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
roomAuction.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
|
||||
return roomAuction;
|
||||
}
|
||||
|
||||
public void mus() {
|
||||
if (mRoomInfoResp.getUser_info().getIs_mute().equals("1")) {
|
||||
com.hjq.toast.ToastUtils.show("您已经被禁言");
|
||||
@@ -1435,7 +1550,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
} else {
|
||||
Log.e("Fragment", "Fragment transaction skipped due to state loss.");
|
||||
}
|
||||
LogUtils.e("加入",roomId);
|
||||
LogUtils.e("加入", roomId);
|
||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
CommonAppContext.getInstance().isPlaying = true;
|
||||
CommonAppContext.getInstance().playId = roomId;
|
||||
@@ -1954,7 +2069,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
AgoraManager.getInstance(this).leaveRoom();
|
||||
AgoraManager.getInstance(this).cleanup();
|
||||
MyRoomSingleton.getInstance().onExitRoom();
|
||||
LogUtils.e("退出im:",roomId);
|
||||
LogUtils.e("退出im:", roomId);
|
||||
MessageListenerSingleton.reset(roomId);
|
||||
// if (publicScreenFragment != null) {
|
||||
// getSupportFragmentManager().beginTransaction().remove(publicScreenFragment).commitAllowingStateLoss();
|
||||
@@ -1966,7 +2081,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
/// 小黑屋退出房间后调用这个加入房间
|
||||
public void jiaR() {
|
||||
LogUtils.e("@@@","上一个房间的roonid"+AgoraManager.getInstance(context).getLastRoomId());
|
||||
LogUtils.e("@@@", "上一个房间的roonid" + AgoraManager.getInstance(context).getLastRoomId());
|
||||
MvpPre.getRoomIn(AgoraManager.getInstance(context).getLastRoomId(), "");
|
||||
AgoraManager.getInstance(context).setLastRoomId("");
|
||||
setviewyc(true);
|
||||
@@ -2242,7 +2357,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
|
||||
@NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
|
||||
}
|
||||
|
||||
@@ -362,6 +362,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
mBinding.llGiftRule.setVisibility(View.GONE);
|
||||
} else {
|
||||
if (event.gift.getActivities_id() == 5) {
|
||||
this.dismiss();
|
||||
showGiftLotteryDialog(event.gift, roomId);
|
||||
return;
|
||||
// String userId = gifyuseradapter.getUserIdToString();
|
||||
@@ -394,14 +395,26 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果当前dialog存在且正在显示,先关闭
|
||||
if (currentDialog != null && currentDialog.isVisible()) {
|
||||
currentDialog.dismiss();
|
||||
}
|
||||
FragmentManager fm = getParentFragmentManager();
|
||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(gift.getGift_bag()+"", roomId, userId);
|
||||
newDialog.show(fm, "GiftLotteryDialog");
|
||||
|
||||
currentDialog = GiftLotteryDialog.newInstance(gift.getGift_bag()+"", roomId, userId);
|
||||
currentDialog.show(getChildFragmentManager(), "GiftLotteryDialog");
|
||||
fm.beginTransaction()
|
||||
.replace(getId(), newDialog)
|
||||
.addToBackStack(null)
|
||||
.commit();
|
||||
|
||||
|
||||
|
||||
// 如果当前dialog存在且正在显示,先关闭
|
||||
// if (currentDialog != null && currentDialog.isVisible()) {
|
||||
// currentDialog.dismiss();
|
||||
// }
|
||||
// currentDialog = GiftLotteryDialog.newInstance(gift.getGift_bag()+"", roomId, userId);
|
||||
// currentDialog.show(getChildFragmentManager(), "GiftLotteryDialog");
|
||||
}
|
||||
|
||||
|
||||
public void setGiftDetail(RoonGiftModel giftDetailResp) {
|
||||
if (giftDetailResp == null) {
|
||||
return;
|
||||
@@ -552,7 +565,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
giftLabelBean.setId("0");
|
||||
giftLabelBean.setName("背包");
|
||||
giftLabelBeans.add(0, giftLabelBean);
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList));
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList,roomId));
|
||||
mBinding.viewPager.setOffscreenPageLimit(0);
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(1);
|
||||
@@ -599,18 +612,19 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
private List<GiftLabelBean> list;
|
||||
private List<Fragment> fragmentList;
|
||||
private String roomId;
|
||||
|
||||
|
||||
public MyFragmentPagerAdapter(FragmentManager fm, List<GiftLabelBean> list, List<Fragment> fragmentList) {
|
||||
public MyFragmentPagerAdapter(FragmentManager fm, List<GiftLabelBean> list, List<Fragment> fragmentList,String roomId) {
|
||||
super(fm);
|
||||
this.list = list;
|
||||
this.fragmentList = fragmentList;
|
||||
this.roomId = roomId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
GiftLabelBean model = list.get(position);
|
||||
Fragment fragment = GiftTwoDetailsFragment.newInstance(model.getId(), 1);
|
||||
Fragment fragment = GiftTwoDetailsFragment.newInstance(model.getId(), 1, roomId);
|
||||
fragmentList.add(fragment); // 保存 Fragment 实例
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.example.moduleroom.databinding.DialogRoomSettingFragmentBinding;
|
||||
import com.example.moduleroom.fragment.RoomBackgroundDialogFragment;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.xscm.moduleutil.event.EffectEvent;
|
||||
import com.xscm.moduleutil.event.MusicEvent;
|
||||
import com.xscm.moduleutil.event.RoomOutEvent;
|
||||
@@ -83,10 +84,9 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
read = 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() != 0) {
|
||||
read = 2;
|
||||
}
|
||||
else if (roomInfoResp.getUser_info().getIs_host() != 0 ) {
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() != 0) {
|
||||
read = 3;
|
||||
}else {
|
||||
} else {
|
||||
read = 4;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getPit_number() != 0) {
|
||||
@@ -145,7 +145,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
dataList.add(new RoomSettingBean("房间补贴", "ic_subsidy", null, null, RoomSettingBean.QXRoomSettingTypeRoomSubsidy, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("主持设置", "ic_compere", null, null, RoomSettingBean.QXRoomSettingTypeRoomCompere, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("清空消息", "ic_clear_message", null, null, RoomSettingBean.QXRoomSettingTypeRoomClearMessage, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("排麦模式", "ic_order_mic", null, null, QXRoomSettingTypeRoomOrderMic, read, isSelected,false, roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")));//等于1的时候,是排麦模式,等于2的时候,是自由模式,这里判断是否是拍卖模式,
|
||||
dataList.add(new RoomSettingBean("排麦模式", "ic_order_mic", null, null, QXRoomSettingTypeRoomOrderMic, read, isSelected, false, roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")));//等于1的时候,是排麦模式,等于2的时候,是自由模式,这里判断是否是拍卖模式,
|
||||
dataList.add(new RoomSettingBean("背景音乐", "ic_bg_music", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgMusic, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("背景图片", "ic_bg_image", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgImage, read, isSelected, false, false));
|
||||
|
||||
@@ -155,7 +155,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
dataList.add(new RoomSettingBean("调音台", "ic_my_dress", null, null, RoomSettingBean.QXRoomSettingTypeRoomMyDress, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("房间设置", "ic_room_setting", null, null, RoomSettingBean.QXRoomSettingTypeRoomSetting, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("房间欢迎语", "ic_welcome", null, null, RoomSettingBean.QXRoomSettingTypeRoomWelcome,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("关闭特效", "ic_close_effects", null, null, RoomSettingBean.QXRoomSettingTypeRoomCloseEffects, read, isSelected, false,effectOn));
|
||||
dataList.add(new RoomSettingBean("关闭特效", "ic_close_effects", null, null, RoomSettingBean.QXRoomSettingTypeRoomCloseEffects, read, isSelected, false, effectOn));
|
||||
dataList.add(new RoomSettingBean("举报", "ic_report", null, null, RoomSettingBean.QXRoomSettingTypeRoomReport, read, isSelected, false, false));
|
||||
List<RoomSettingBean> filteredList = new ArrayList<>();
|
||||
// 更新 itemType
|
||||
@@ -247,27 +247,47 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomLeave) {
|
||||
EventBus.getDefault().post(new RoomOutEvent());
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeSing) {
|
||||
MvpPre.changeRoomType(roomId, "1");
|
||||
// MvpPre.changeRoomType(roomId, "1");
|
||||
queren("1");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction) {
|
||||
MvpPre.changeRoomType(roomId, "2");
|
||||
// MvpPre.changeRoomType(roomId, "2");
|
||||
queren("2");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy) {
|
||||
MvpPre.changeRoomType(roomId, "3");
|
||||
// MvpPre.changeRoomType(roomId, "3");
|
||||
queren("3");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl) {
|
||||
MvpPre.changeRoomType(roomId, "4");
|
||||
}
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy) {
|
||||
MvpPre.changeRoomType(roomId, "7");
|
||||
}
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
// MvpPre.changeRoomType(roomId, "4");
|
||||
queren("4");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy) {
|
||||
// MvpPre.changeRoomType(roomId, "7");
|
||||
queren("7");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||
}else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport){
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: 2025/8/29 房间切换提示框
|
||||
private void queren(String type) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"即将修改房间类型为" + (type.equals("1") ? "点唱" : (type.equals("2") ? "拍卖" : (type.equals("3") ? "男神" : (type.equals("4") ? "女神" : (type.equals("7") ? "交友" : ""))))),
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre.changeRoomType(roomId, type);
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
private void upAdapter() {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
@@ -277,8 +297,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
int roleLevel = bean.getRead(); // 角色等级
|
||||
boolean onMic = false; // 是否是特定房间
|
||||
|
||||
if (roomInfoResp.getRoom_info().getType_id().equals("1") && roomInfoResp.getRoom_info().getLabel_id().equals("2") ){
|
||||
onMic=true;
|
||||
if (roomInfoResp.getRoom_info().getType_id().equals("1") && roomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
onMic = true;
|
||||
}
|
||||
|
||||
// 房主显示全部
|
||||
@@ -289,13 +309,13 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}else if (roleLevel == 2 || roleLevel == 3){
|
||||
if (type== RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl||
|
||||
type== RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage||type == -1){
|
||||
if (onMic ) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic){
|
||||
} else if (roleLevel == 2 || roleLevel == 3) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage || type == -1) {
|
||||
if (onMic) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -372,10 +392,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
@Override
|
||||
public void changeRoomSuccess(String s, int position, RoomSettingBean bean) {
|
||||
if (bean.isSelect()){
|
||||
if (bean.isSelect()) {
|
||||
bean.setSelect(false);
|
||||
adapter.notifyItemChanged(position);
|
||||
}else {
|
||||
} else {
|
||||
bean.setSelect(true);
|
||||
adapter.notifyItemChanged(position);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class RoomWheatGiftSettingFragment extends BaseMvpDialogFragment<RewardGi
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
Fragment fragment = GiftTwoDetailsFragment.newInstance("1", 0);
|
||||
Fragment fragment = GiftTwoDetailsFragment.newInstance("1", 0,"");
|
||||
fragmentList.add(fragment); // 保存 Fragment 实例
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@@ -616,6 +616,9 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
} else if (message.getMsgType() == 1055) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType()==1056 || message.getMsgType()==1057){
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
// easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
|
||||
@@ -48,6 +48,7 @@ import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.xscm.moduleutil.widget.RoomFriendshipWheatView;
|
||||
import com.xscm.moduleutil.widget.RoomMakeWheatView;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -82,56 +83,41 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
private int type;
|
||||
RoomFragment parentFragment;
|
||||
|
||||
public static RoomAuctionFragment newInstance(RoomInfoResp roomInfoResp, int type) {
|
||||
public static RoomAuctionFragment newInstance() {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
||||
RoomAuctionFragment fragment = new RoomAuctionFragment();
|
||||
args.putSerializable("roomInfo", roomInfoResp);
|
||||
args.putInt("type", type);
|
||||
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
// public static RoomAuctionFragment newInstance(RoomInfoResp roomInfoResp, int type) {
|
||||
//
|
||||
// Bundle args = new Bundle();
|
||||
//
|
||||
// RoomAuctionFragment fragment = new RoomAuctionFragment();
|
||||
// args.putSerializable("roomInfo", roomInfoResp);
|
||||
// args.putInt("type", type);
|
||||
// fragment.setArguments(args);
|
||||
// return fragment;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfo");
|
||||
type = getArguments().getInt("type");
|
||||
// roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfo");
|
||||
// type = getArguments().getInt("type");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RoomAuctionPresenterTow bindPresenter() {
|
||||
return new RoomAuctionPresenterTow(this, getActivity());
|
||||
}
|
||||
|
||||
public void initOverlayButtons() {
|
||||
// if (isButtonsInflated) return;
|
||||
|
||||
stub = requireActivity().findViewById(R.id.stub_buttons);
|
||||
if (stub != null) {
|
||||
View inflated = stub.inflate();
|
||||
|
||||
imActionJs = inflated.findViewById(R.id.im_action_ys);
|
||||
imActionYs = inflated.findViewById(R.id.im_action_js);
|
||||
|
||||
if (imActionJs != null && imActionYs != null) {
|
||||
// 设置点击事件
|
||||
imActionJs.setOnClickListener(this::onChock);
|
||||
imActionYs.setOnClickListener(this::onChock);
|
||||
|
||||
// isButtonsInflated = true;
|
||||
} else {
|
||||
// 报错提示:说明 top_overlay_buttons.xml 中没有定义这些 id
|
||||
throw new IllegalStateException("im_action_js or im_action_ys not found in overlay layout");
|
||||
}
|
||||
///更新数据
|
||||
public void roomInfoUpdate(RoomInfoResp resp) {
|
||||
roomInfoResp = resp;
|
||||
if (roomInfoResp.getRoom_info().getLabel_id().equals("1")){
|
||||
type=1;
|
||||
}else if (roomInfoResp.getRoom_info().getLabel_id().equals("2")){
|
||||
type=2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
initOverlayButtons();
|
||||
LogUtils.e("lxj", "展示room时间:" + TimeUtils.date2String(new Date()));
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
}
|
||||
@@ -141,6 +127,15 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
wheatView.setData(roomPitBean);
|
||||
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
}else {
|
||||
RoomPitBean pitBean =new RoomPitBean();
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setPit_number("9");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
wheatView.setData(pitBean);
|
||||
}
|
||||
parentFragment = (RoomFragment) getParentFragment();
|
||||
|
||||
@@ -213,6 +208,56 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RoomAuctionPresenterTow bindPresenter() {
|
||||
return new RoomAuctionPresenterTow(this, getActivity());
|
||||
}
|
||||
|
||||
///主持上麦
|
||||
public void auctionData(RoomMessageEvent messageEvent){
|
||||
// wheatView.setData(getPitBean(messageEvent));
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean(messageEvent));
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
imActionJs.setVisibility(View.VISIBLE);
|
||||
imActionYs.setVisibility(View.VISIBLE);
|
||||
|
||||
parentFragment.updateWheatStatus(getPitBean(messageEvent), 9, true, true);
|
||||
} else {
|
||||
getvjs();
|
||||
imActionYs.setVisibility(INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void initOverlayButtons() {
|
||||
// if (isButtonsInflated) return;
|
||||
|
||||
stub = requireActivity().findViewById(R.id.stub_buttons);
|
||||
if (stub != null) {
|
||||
View inflated = stub.inflate();
|
||||
|
||||
imActionJs = inflated.findViewById(R.id.im_action_ys);
|
||||
imActionYs = inflated.findViewById(R.id.im_action_js);
|
||||
|
||||
if (imActionJs != null && imActionYs != null) {
|
||||
// 设置点击事件
|
||||
imActionJs.setOnClickListener(this::onChock);
|
||||
imActionYs.setOnClickListener(this::onChock);
|
||||
|
||||
// isButtonsInflated = true;
|
||||
} else {
|
||||
// 报错提示:说明 top_overlay_buttons.xml 中没有定义这些 id
|
||||
throw new IllegalStateException("im_action_js or im_action_ys not found in overlay layout");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
|
||||
private void getvjs() {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1 || roomInfoResp.getUser_info().getIs_management() == 1 || roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
@@ -351,18 +396,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
|
||||
private void getTextView() {
|
||||
// int defaultColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_0DFFB9); // 原亲密拍颜色
|
||||
// int selectedColor = Color.WHITE; // 原真爱拍颜色
|
||||
// float defaultSize = 24f; // 亲密拍默认字体大小
|
||||
// float selectedSize = 16f; // 真爱拍默认字体大小
|
||||
// if (type == 1) {
|
||||
// toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
// }else {
|
||||
// toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
// }
|
||||
//
|
||||
//
|
||||
|
||||
int defaultColor = ContextCompat.getColor(requireContext(), com.xscm.moduleutil.R.color.color_0DFFB9); // 亲密拍默认颜色
|
||||
int selectedColor = ContextCompat.getColor(requireContext(), com.xscm.moduleutil.R.color.color_white); // 切换到真爱拍的颜色
|
||||
float defaultSize = 24f; // 亲密拍默认字体大小
|
||||
@@ -586,52 +619,29 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||
boolean b = false;
|
||||
if (messageEvent.getMsgType() == 1003) {//上麦
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean(messageEvent));
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
imActionJs.setVisibility(View.VISIBLE);
|
||||
imActionYs.setVisibility(View.VISIBLE);
|
||||
|
||||
parentFragment.updateWheatStatus(getPitBean(messageEvent), 9, true, true);
|
||||
// parentFragment.setRoleType(3, 9);
|
||||
// parentFragment.switchMic(2);
|
||||
} else {
|
||||
getvjs();
|
||||
imActionYs.setVisibility(INVISIBLE);
|
||||
// if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// parentFragment.setRoleType(3, 0);
|
||||
// parentFragment.switchMic(2);
|
||||
// }
|
||||
}
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1004) {
|
||||
// if (messageEvent.getMsgType() == 1003) {//上麦
|
||||
// if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
// wheatView.setData(getPitBean(messageEvent));
|
||||
// if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// imActionJs.setVisibility(View.VISIBLE);
|
||||
// imActionYs.setVisibility(View.VISIBLE);
|
||||
//
|
||||
// parentFragment.updateWheatStatus(getPitBean(messageEvent), 9, true, true);
|
||||
// } else {
|
||||
// getvjs();
|
||||
// imActionYs.setVisibility(INVISIBLE);
|
||||
// }
|
||||
// }
|
||||
// } else
|
||||
if (messageEvent.getMsgType() == 1004) {
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean2(messageEvent, "9"));
|
||||
getvjs();
|
||||
imActionYs.setVisibility(GONE);
|
||||
|
||||
// RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(messageEvent.getText().getPit_number()) - 1);
|
||||
// pitBean.setUser_id("");
|
||||
// pitBean.setAvatar("");
|
||||
// pitBean.setNickname("");
|
||||
// pitBean.setSex("");
|
||||
// pitBean.setCharm("");
|
||||
// roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(messageEvent.getText().getPit_number()) - 1, pitBean);
|
||||
// if (SpUtil.getUserId() == messageEvent.getText().getFromUserInfo().getUser_id()) {
|
||||
//
|
||||
// AgoraManager.getInstance(getActivity()).ClientRole(false);
|
||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
||||
// } else {
|
||||
// b = false;
|
||||
// }
|
||||
//// AgoraManager.getInstance(getActivity()).setEnableAudio(b);
|
||||
// if (parentFragment != null) {
|
||||
// parentFragment.updateWheatStatus(pitBean, Integer.parseInt(messageEvent.getText().getPit_number()), false, b);
|
||||
// }
|
||||
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
RoomPitBean pitBean = wheatView.pitBean;
|
||||
@@ -1053,8 +1063,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
// TODO: 2025/6/30 上麦,麦位变化
|
||||
private RoomPitBean getPitBean(RoomMessageEvent messageEvent) {
|
||||
RoomFragment parentFragment = (RoomFragment) getParentFragment();
|
||||
boolean b;
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(messageEvent.getText().getPit_number());
|
||||
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||
@@ -1063,17 +1071,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
|
||||
// if (SpUtil.getUserId() == messageEvent.getText().getFromUserInfo().getUser_id()) {
|
||||
// b = true;
|
||||
// AgoraManager.getInstance(getActivity()).ClientRole(true);
|
||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
// } else {
|
||||
// b = false;
|
||||
// }
|
||||
if (parentFragment != null) {
|
||||
|
||||
// parentFragment.updateWheatStatus(pitBean, Integer.parseInt(messageEvent.getText().getPit_number()), true, b);
|
||||
}
|
||||
return pitBean;
|
||||
}
|
||||
|
||||
@@ -1093,18 +1090,18 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (!EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
// if (!EventBus.getDefault().isRegistered(this)) {
|
||||
// EventBus.getDefault().register(this);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
// if (EventBus.getDefault().isRegistered(this)) {
|
||||
// EventBus.getDefault().unregister(this);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1134,4 +1131,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
|
||||
}
|
||||
|
||||
@@ -278,6 +278,13 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
friendshipRoomFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
|
||||
}else if ("2".equals(typeId)){//拍卖房
|
||||
RoomAuctionFragment auctionRoomFragment = (RoomAuctionFragment) getChildFragmentManager()
|
||||
.findFragmentByTag(RoomAuctionFragment.class.getSimpleName());
|
||||
if (auctionRoomFragment != null && auctionRoomFragment.isAdded()){
|
||||
auctionRoomFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -376,9 +383,11 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
replaceNestedFragment(RoomAuctionFragment.newInstance(mRoomInfoResp, 1), R.id.container);
|
||||
replaceNestedFragment(RoomAuctionFragment.newInstance(), R.id.container);
|
||||
// replaceNestedFragment(RoomAuctionFragment.newInstance(mRoomInfoResp, 1), R.id.container);
|
||||
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
replaceNestedFragment(RoomAuctionFragment.newInstance(mRoomInfoResp, 2), R.id.container);
|
||||
replaceNestedFragment(RoomAuctionFragment.newInstance(), R.id.container);
|
||||
// replaceNestedFragment(RoomAuctionFragment.newInstance(mRoomInfoResp, 2), R.id.container);
|
||||
}
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
replaceNestedFragment(RoomCabinFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
@@ -398,12 +407,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
replaceNestedFragment(RoomKtvFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
}
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||
// if (getActivity() instanceof RoomActivity) {
|
||||
// ((RoomActivity) getActivity()).changeBackground(com.xscm.moduleutil.R.mipmap.jiaoy_bj);
|
||||
// }
|
||||
replaceNestedFragment(FriendshipRoomFragment.newInstance(), R.id.container);
|
||||
}
|
||||
// mBinding.inputMenu1.performClick();
|
||||
instView();
|
||||
setview();
|
||||
|
||||
@@ -486,7 +491,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).upRoomInfo(mRoomInfoResp);
|
||||
}
|
||||
|
||||
updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||
}
|
||||
|
||||
public void updateSeatViewExchangedWithPitArray(RoomInfoResp roomInfoResp) {
|
||||
@@ -1139,7 +1144,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||
if (messageEvent.getMsgType() == 123) {
|
||||
// // 获取 PublicScreenEaseChatFragment 实例
|
||||
@@ -1150,28 +1155,31 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
// 调用 someMethod 方法
|
||||
publicScreenEaseChatFragment.someMethod();
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1003) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// mBinding.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
aBoolean = false;
|
||||
((RoomActivity) getActivity()).ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
((RoomActivity) getActivity()).setBoolean(aBoolean);
|
||||
mRoomInfoResp.getUser_info().setPit_number(messageEvent.getText().getPit_number() != null ? Integer.parseInt(messageEvent.getText().getPit_number()) : 0);
|
||||
((RoomActivity) getActivity()).setRoleType(3, Integer.parseInt(messageEvent.getText().getPit_number()));
|
||||
((RoomActivity) getActivity()).switchMic(2);
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1004) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// mBinding.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
aBoolean = true;
|
||||
((RoomActivity) getActivity()).ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
((RoomActivity) getActivity()).setBoolean(aBoolean);
|
||||
mRoomInfoResp.getUser_info().setPit_number(0);
|
||||
((RoomActivity) getActivity()).setRoleType(0, 0);
|
||||
((RoomActivity) getActivity()).switchMic(2);
|
||||
}
|
||||
// setRoleType(messageEvent.getRoleType(), messageEvent.getPit_number());
|
||||
} else if (messageEvent.getMsgType() == 1034) {
|
||||
}
|
||||
// else if (messageEvent.getMsgType() == 1003) {
|
||||
// if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
//// mBinding.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
// aBoolean = false;
|
||||
// ((RoomActivity) getActivity()).ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
// ((RoomActivity) getActivity()).setBoolean(aBoolean);
|
||||
// mRoomInfoResp.getUser_info().setPit_number(messageEvent.getText().getPit_number() != null ? Integer.parseInt(messageEvent.getText().getPit_number()) : 0);
|
||||
// ((RoomActivity) getActivity()).setRoleType(3, Integer.parseInt(messageEvent.getText().getPit_number()));
|
||||
// ((RoomActivity) getActivity()).switchMic(2);
|
||||
// }
|
||||
// }
|
||||
// else if (messageEvent.getMsgType() == 1004) {
|
||||
// if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
//// mBinding.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
// aBoolean = true;
|
||||
// ((RoomActivity) getActivity()).ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
// ((RoomActivity) getActivity()).setBoolean(aBoolean);
|
||||
// mRoomInfoResp.getUser_info().setPit_number(0);
|
||||
// ((RoomActivity) getActivity()).setRoleType(0, 0);
|
||||
// ((RoomActivity) getActivity()).switchMic(2);
|
||||
// }
|
||||
//// setRoleType(messageEvent.getRoleType(), messageEvent.getPit_number());
|
||||
// } else
|
||||
if (messageEvent.getMsgType() == 1034) {
|
||||
int count = messageEvent.getText().getCount();
|
||||
if (count == 0) {
|
||||
((RoomActivity) getActivity()).tvFirst(new SpannableStringBuilder("0人排队"));
|
||||
@@ -1219,4 +1227,12 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
// }
|
||||
|
||||
|
||||
///拍卖房上麦数据
|
||||
public void auctionData(RoomMessageEvent messageEvent){
|
||||
RoomAuctionFragment auctionFragment = (RoomAuctionFragment) getChildFragmentManager()
|
||||
.findFragmentByTag(FriendshipRoomFragment.class.getSimpleName());
|
||||
if (auctionFragment != null)
|
||||
auctionFragment.auctionData(messageEvent);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class CardRelationshipPresenter extends BasePresenter<CardRelationshipCon
|
||||
|
||||
@Override
|
||||
public void getGiftList(String id) {
|
||||
api.getGiftList(Integer.parseInt(id), new BaseObserver<List<RoonGiftModel>>() {
|
||||
api.getGiftList(Integer.parseInt(id),"", new BaseObserver<List<RoonGiftModel>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
Reference in New Issue
Block a user