1:修改送礼物不选择礼物的时候,直接提示错误信息

2:修改小黑屋不能发布横屏数据
This commit is contained in:
2025-10-13 21:53:59 +08:00
parent adb72522e2
commit 88930b3b74
13 changed files with 82 additions and 43 deletions

View File

@@ -124,7 +124,7 @@
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:requestLegacyExternalStorage="true"
android:resizeableActivity="false"
android:resizeableActivity="true"
android:icon="@mipmap/ic_launcher_app"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round_app"

View File

@@ -29,7 +29,7 @@ isBuildModule=false
android.injected.testOnly=false
APP_VERSION_NAME=1.2.9
APP_VERSION_CODE=183
APP_VERSION_CODE=184
org.gradle.jvm.toolchain.useLegacyAdapters=false
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15

View File

@@ -49,8 +49,8 @@ public class RoomSettingBean implements MultiItemEntity {
public static final int QXRoomSettingTypeRoomCloseEffects = 25;
/// 意见反馈
public static final int QXRoomSettingTypeRoomReport = 26;
public static final int QXRoomSettingTypeRoomFloatingScreen = 29;
public static final int QXRoomSettingTypeRoomFloatingRed = 30;
public static final int QXRoomSettingTypeRoomFloatingScreen = 29;//关闭飘屏
public static final int QXRoomSettingTypeRoomFloatingRed = 30;//红包
public static final int ITEM_TYPE_DEFAULT = 0;
public static final int ITEM_TYPE_WITH_ICON = 1;

View File

@@ -1817,7 +1817,18 @@ public class RetrofitClient {
BaseModel<RoomInfoResp> roomInfoRespBaseModel = response.body();
if (roomInfoRespBaseModel.getCode() == 1) {
observer.onNext(roomInfoRespBaseModel.getData());
} else {
}else if (roomInfoRespBaseModel.getCode() == 301){
ToastUtils.showShort(roomInfoRespBaseModel.getMsg());
try {
CommonAppContext.getInstance().clearLoginInfo();
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}else if (roomInfoRespBaseModel.getCode() == 0){
ToastUtils.showShort(roomInfoRespBaseModel.getMsg());
observer.onNext(null);
}
else {
MessageListenerSingleton.getInstance().quitGroup(roomId);
}
}

View File

@@ -51,11 +51,11 @@ public class EnvironmentPrefs {
// }
// 默认使用生产环境
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.TEST.name());
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
try {
return EnvironmentEnum.valueOf(envName);
} catch (IllegalArgumentException e) {
return EnvironmentEnum.TEST; // 出错时默认返回生产环境
return EnvironmentEnum.PRODUCTION; // 出错时默认返回生产环境
}
}
}

View File

@@ -2164,7 +2164,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if (text.fromUserInfo.user_id == SpUtil.getUserId()) {
LogUtils.e("退出房间")
MvpPre!!.quitRoom(roomId, SpUtil.getUserId().toString() + "")
// MvpPre!!.quitRoom(roomId, SpUtil.getUserId().toString() + "")
performExitRoom(1)
}
}
@@ -4113,6 +4114,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
override fun quitRoom() {
}
//退出房间进行销毁
@@ -4194,6 +4196,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
override fun findRoom() {
}
override fun roomEit() {
performExitRoom(1)
}
private fun queren1(nickname: String) {
// 创建并显示确认对话框
ConfirmDialog(

View File

@@ -49,6 +49,8 @@ public class RoomContacts {
void userOnlineStatus(List<UserOnlineStatusBean> list);
void findRoom();
void roomEit();
}
public interface IRoomPre extends IPresenter {

View File

@@ -582,7 +582,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
// return;
// }
// } else {
if (roonGiftModel == null) {
if (roonGiftModel == null|| roonGiftModel.getGift_id() == null) {
ToastUtils.show("请选择礼物");
return;
}

View File

@@ -463,4 +463,9 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
mBinding.srl.finishRefresh();
mBinding.srl.finishLoadMore();
}
@Override
public void roomEit() {
}
}

View File

@@ -549,21 +549,21 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
return;
}
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
}else if (id == R.id.question_mark){
} else if (id == R.id.question_mark) {
// Bundle bundle = new Bundle();
// bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"api/Page/page_show?id=22");
// WebViewDialog dialog = new WebViewDialog(getActivity(), bundle);
// dialog.show();
if (type==1) {
if (type == 1) {
Bundle bundle = new Bundle();
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"api/Page/page_show?id=23");
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "api/Page/page_show?id=23");
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(getActivity(), bundle);
dialog.show();
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=23").withString("title", "真爱拍规则").navigation();
}else {
} else {
Bundle bundle = new Bundle();
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"api/Page/page_show?id=22");
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "api/Page/page_show?id=22");
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(getActivity(), bundle);
dialog.show();
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=22").withString("title", "亲密拍规则").navigation();
@@ -915,7 +915,8 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
// ((RoomActivity) getActivity()).switchMic(2);
// }
// }
//// }
/// / }
// }
// yinc();
// }
@@ -1018,7 +1019,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
// }
//
// }
private void gengv() {
if (auctionUserBean != null) {
mBinding.tvRelation.setText(auctionUserBean.getRelation_name());
@@ -1034,7 +1034,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
// TODO: 2025/9/12 清除个人魅力
public void event1059(RoomMessageEvent messageEvent) {
RoomPitBean pitBean = wheatView.pitBean;
if (pitBean!=null) {
if (pitBean != null) {
if (pitBean.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean.setCharm("");
wheatView.setCharm("0");
@@ -1042,7 +1042,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean2 = wheatView2.pitBean;
if (pitBean2!=null) {
if (pitBean2 != null) {
if (pitBean2.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean2.setCharm("");
wheatView2.setCharm("0");
@@ -1051,15 +1051,15 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean3 = mBinding.ivAuction1.pitBean;
if (pitBean3!=null){
if (pitBean3.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean3.setCharm("");
mBinding.ivAuction1.setmTvTime("0");
return;
}
if (pitBean3 != null) {
if (pitBean3.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean3.setCharm("");
mBinding.ivAuction1.setmTvTime("0");
return;
}
}
RoomPitBean pitBean4 = mBinding.ivAuction2.pitBean;
if (pitBean4!=null) {
if (pitBean4 != null) {
if (pitBean4.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean4.setCharm("");
mBinding.ivAuction2.setmTvTime("0");
@@ -1067,7 +1067,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean5 = mBinding.ivAuction3.pitBean;
if (pitBean5!=null) {
if (pitBean5 != null) {
if (pitBean5.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean5.setCharm("");
mBinding.ivAuction3.setmTvTime("0");
@@ -1082,7 +1082,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
RoomPitBean pitBean = wheatView.pitBean;
if (pitBean!=null) {
if (pitBean != null) {
if (pitBean.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean.setIs_online(type == 1 ? 1 : 2);
wheatView.setData(pitBean);
@@ -1090,7 +1090,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean2 = wheatView2.pitBean;
if (pitBean2!=null) {
if (pitBean2 != null) {
if (pitBean2.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean2.setIs_online(type == 1 ? 1 : 2);
wheatView2.setData(pitBean2);
@@ -1098,7 +1098,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean3 = mBinding.ivAuction1.pitBean;
if (pitBean3!=null) {
if (pitBean3 != null) {
if (pitBean3.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean3.setIs_online(type == 1 ? 1 : 2);
mBinding.ivAuction1.setData(pitBean3);
@@ -1106,7 +1106,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean4 = mBinding.ivAuction2.pitBean;
if (pitBean4!=null) {
if (pitBean4 != null) {
if (pitBean4.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean4.setIs_online(type == 1 ? 1 : 2);
mBinding.ivAuction2.setData(pitBean4);
@@ -1114,7 +1114,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean5 = mBinding.ivAuction3.pitBean;
if (pitBean5!=null) {
if (pitBean5 != null) {
if (pitBean5.getUser_id().equals(messageEvent.getText().getUser_id())) {
pitBean5.setIs_online(type == 1 ? 1 : 2);
mBinding.ivAuction3.setData(pitBean5);
@@ -1291,7 +1291,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
public void event1035(RoomMessageEvent messageEvent) {
RoomPitBean pitBean = mBinding.roomMakeWheat.pitBean;
if (pitBean!=null) {
if (pitBean != null) {
if (pitBean.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
@@ -1301,14 +1301,14 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
}
}
RoomPitBean pitBean2 = mBinding.roomMakeWheat2.pitBean;
if (pitBean2 != null){
if (pitBean2.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
pitBean2.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
pitBean2.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
pitBean2.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
pitBean2.setDress(messageEvent.getText().getFromUserInfo().getDress());
mBinding.roomMakeWheat2.setData(pitBean2);
}
if (pitBean2 != null) {
if (pitBean2.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
pitBean2.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
pitBean2.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
pitBean2.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
pitBean2.setDress(messageEvent.getText().getFromUserInfo().getDress());
mBinding.roomMakeWheat2.setData(pitBean2);
}
}
if (auctionList != null && auctionList.size() > 0) {

View File

@@ -1203,6 +1203,11 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
}
@Override
public void roomEit() {
}
public void getVoiceStatus(RoomAuction.AuctionUserBean auctionUserBean, List<RoomAuction.AuctionListBean> auctionListBeans, String user_id) {
boolean haveMe = false;

View File

@@ -1434,4 +1434,9 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
public void findRoom() {
}
@Override
public void roomEit() {
}
}

View File

@@ -47,6 +47,13 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
@Override
public void onNext(RoomInfoResp resp) {
if (MvpRef==null){
MvpRef=new WeakReference<>(mView);
}
if (resp==null){
MvpRef.get().roomEit();
return;
}
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId();
String token = resp.getUser_info().getAgora_token(); // 如果启用了鉴权才需要
String roomId = resp.getRoom_info().getRoom_id(); // 房间 ID
@@ -77,9 +84,7 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
// 2. 加入房间
// rtcCore.joinRoom(token, roomId, uid, enableMic);
if (MvpRef==null){
MvpRef=new WeakReference<>(mView);
}
MvpRef.get().roomInfo(resp);
}