1:修改交友房出现嘉宾会闭麦的情况

This commit is contained in:
2025-11-03 10:08:58 +08:00
parent f4f04b59a8
commit f5377127ce
21 changed files with 459 additions and 524 deletions

View File

@@ -1,45 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="羽声.app" />
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="true" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="RESTORE_ENABLED" value="false" />
<option name="RESTORE_FILE" value="" />
<option name="RESTORE_FRESH_INSTALL_ONLY" value="true" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="DEBUGGER_TYPE" value="Java" />
<Java>
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
<option name="DEBUG_SANDBOX_SDK" value="false" />
</Java>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,37 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qxcm.qxlive",
"variantName": "releasRelease",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 45,
"versionName": "1.0.5.5",
"outputFile": "羽声_1.0.5.5_45.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/羽声_1.0.5.5_45.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/羽声_1.0.5.5_45.dm"
]
}
],
"minSdkVersionForDexing": 24
}

View File

@@ -28,8 +28,8 @@ isBuildModule=false
#org.gradle.deamon=false
android.injected.testOnly=false
APP_VERSION_NAME=1.0.5.5
APP_VERSION_CODE=45
APP_VERSION_NAME=1.0.5.7
APP_VERSION_CODE=47
org.gradle.jvm.toolchain.useLegacyAdapters=false
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15

View File

@@ -3,15 +3,9 @@ agp = "8.4.0"
alipayAlipaysdkAndroid = "15.8.33"
arouterApiVersion = "1.5.2"
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
comLiulishuoOkdownloadOkdownload4 = "1.0.7"
comLiulishuoOkdownloadSqlite3 = "1.0.7"
comLiulishuoOkdownloadOkhttp3 = "1.0.7"
comLiulishuoOkdownloadFiledownloader3 = "1.0.7"
custompopwindow = "2.1.1"
databindingRuntimeVersion = "7.0.2"
easypermissions = "3.0.0"
easyProtectorRelease = "1.1.2"
egameAnimplayer = "2.0.8"
flexboxVersion = "1.0.0"
githubBannerviewpagerVersion = "3.5.12"
githubGlide = "4.12.0"
@@ -20,28 +14,23 @@ githubPhotoview = "2.3.0"
githubRealtimeblurviewVersion = "1.2.1"
githubShadowlayout = "3.3.1"
gradle = "8.8.0"
#gradle = "8.5.0-alpha04"
greendaoGradlePlugin = "3.3.0"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
libraryVersion = "1.4"
lombok = "1.18.32"
marqueeview = "1.1.0"
material = "1.10.0"
activity = "1.8.0"
constraintlayout = "2.1.4"
arouter = "1.0.2"
arouterAnnotation = "1.0.6"
arouterCompiler = "1.5.2"
arouterApi = "1.5.2"
comSquareupRetrofit2Retrofit3 = "2.9.0"
fastjson = "1.2.60"
githubBaserecyclerviewadapterhelper = "2.9.30"
gsonVersion = "2.10.1"
eventbusAnnotationProcessorVersion = "3.3.1"
eventbusVersion = "3.3.1"
logger = "2.2.0"
loggingInterceptorVersion = "3.10.0"
@@ -49,35 +38,24 @@ multidex = "2.0.1"
ossAndroidSdkVersion = "2.9.21"
permissionx = "1.7.1"
persistentcookiejar = "v1.0.1"
picture_libraryVersion = "v2.6.0"
reactivexRxjava = "2.2.21"
retrofit2KotlinCoroutinesAdapterVersion = "0.9.2"
roundedimageview = "2.3.0"
rxandroid = "2.1.1"
scwangSmartrefreshlayout = "1.1.0-alpha-20"
scwangSmartrefreshheader = "1.1.0-alpha-20"
singledateandtimepicker = "2.2.7"
svgaplayerAndroid = "2.5.13"
toastVersion = "8.2"
togglebuttonLibraryVersion = "1.0.0"
utilcode = "1.30.6"
databindingRuntime = "8.8.0"
datastoreCoreAndroid = "1.1.5"
kotlin = "2.0.0"
lifecycleRuntimeKtx = "2.6.1"
activityCompose = "1.8.0"
composeBom = "2024.04.01"
kotlinVersion = "1.9.24"
coreKtx = "1.10.1"
lifecycleLivedataKtx = "2.6.1"
lifecycleViewmodelKtx = "2.6.1"
webpdecoder = "1.6.4.9.0"
wechatSdkAndroid = "6.8.30"
xbanner = "1.7.0"
appcompatVersion = "1.3.1"
legacySupportV4 = "1.0.0"
fragmentKtx = "1.5.6"
cosAndroidLite = "5.9.46"
interpolator = "1.0.0"
[libraries]
@@ -89,11 +67,6 @@ com-github-bumptech-glide-glide = { module = "com.github.bumptech.glide:glide",
com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" }
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
#com-liulishuo-okdownload-filedownloader4 = { module = "com.liulishuo.okdownload:filedownloader", version.ref = "comLiulishuoOkdownloadFiledownloader3" }
#com-liulishuo-okdownload-okhttp4 = { module = "com.liulishuo.okdownload:okhttp", version.ref = "comLiulishuoOkdownloadOkhttp3" }
#com-liulishuo-okdownload-sqlite4 = { module = "com.liulishuo.okdownload:sqlite", version.ref = "comLiulishuoOkdownloadSqlite3" }
#com-liulishuo-okdownload-okdownload6 = { module = "com.liulishuo.okdownload:okdownload", version.ref = "comLiulishuoOkdownloadOkdownload4" }
#custompopwindow = { module = "com.github.pinguo-zhouwei:CustomPopwindow", version.ref = "custompopwindow" }
databinding-runtime-v702 = { module = "androidx.databinding:databinding-runtime", version.ref = "databindingRuntimeVersion" }
dpa-oss-android-sdk = { module = "com.aliyun.dpa:oss-android-sdk", version.ref = "ossAndroidSdkVersion" }
easy-protector-release = { module = "com.lahm.library:easy-protector-release", version.ref = "easyProtectorRelease" }
@@ -101,7 +74,6 @@ easypermissions = { module = "pub.devrel:easypermissions", version.ref = "easype
#egame-animplayer = { module = "com.egame.vap:animplayer", version.ref = "egameAnimplayer" }
github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" }
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
#glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" }
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
greendao-gradle-plugin = { module = "org.greenrobot:greendao-gradle-plugin", version.ref = "greendaoGradlePlugin" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
@@ -124,43 +96,25 @@ github-baserecyclerviewadapterhelper = { module = "com.github.CymChad:BaseRecycl
hjq-toast = { module = "com.hjq:toast", version.ref = "toastVersion" }
jakewharton-retrofit2-kotlin-coroutines-adapter = { module = "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter", version.ref = "retrofit2KotlinCoroutinesAdapterVersion" }
greenrobot-eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbusVersion" }
#greenrobot-eventbus-annotation-processor = { module = "org.greenrobot:eventbus-annotation-processor", version.ref = "eventbusAnnotationProcessorVersion" }
google-gson = { module = "com.google.code.gson:gson", version.ref = "gsonVersion" }
logger = { module = "com.orhanobut:logger", version.ref = "logger" }
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
#numberprogressbar-library = { module = "com.daimajia.numberprogressbar:library", version.ref = "libraryVersion" }
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptorVersion" }
permissionx = { module = "com.guolindev.permissionx:permissionx", version.ref = "permissionx" }
persistentcookiejar = { module = "com.github.franmontiel:PersistentCookieJar", version.ref = "persistentcookiejar" }
#pictureselector-picture_library = { module = "com.github.LuckSiege.PictureSelector:picture_library", version.ref = "picture_libraryVersion" }
reactivex-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "reactivexRxjava" }
roundedimageview = { module = "com.makeramen:roundedimageview", version.ref = "roundedimageview" }
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
#singledateandtimepicker = { module = "com.github.florent37:singledateandtimepicker", version.ref = "singledateandtimepicker" }
squareup-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2Retrofit3" }
retrofit2-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "comSquareupRetrofit2Retrofit3" }
svgaplayer-android = { module = "com.github.yyued:SVGAPlayer-Android", version.ref = "svgaplayerAndroid" }
utilcode = { module = "com.blankj:utilcode", version.ref = "utilcode" }
#databinding-runtime = { group = "androidx.databinding", name = "databinding-runtime", version.ref = "databindingRuntime" }
#datastore-core-android = { group = "androidx.datastore", name = "datastore-core-android", version.ref = "datastoreCoreAndroid" }
#lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
#activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
#compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
#ui = { group = "androidx.compose.ui", name = "ui" }
#ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
#ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
#ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
#ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
#ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
#material3 = { group = "androidx.compose.material3", name = "material3" }
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
#webpdecoder = { module = "com.zlc.glide:webpdecoder", version.ref = "webpdecoder" }
wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" }
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompatVersion" }
androidx-legacy-support-v4 = { group = "androidx.legacy", name = "legacy-support-v4", version.ref = "legacySupportV4" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragmentKtx" }
androidx-interpolator = { group = "androidx.interpolator", name = "interpolator", version.ref = "interpolator" }

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tool="http://schemas.android.com/tools">
<data>
@@ -216,7 +217,7 @@
android:background="@drawable/bg_r100_hui"
android:gravity="center"
android:singleLine="true"
android:text="2001"
tool:text="2001"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
@@ -241,7 +242,7 @@
android:background="@drawable/bg_r100_hui"
android:gravity="center"
android:singleLine="true"
android:text="12"
tool:text="12"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
@@ -266,7 +267,7 @@
android:background="@drawable/bg_r100_hui"
android:gravity="center"
android:singleLine="true"
android:text="1"
tool:text="1"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />

View File

@@ -67,8 +67,6 @@ dependencies {
implementation project(':moduletablayout')
implementation libs.activity
implementation libs.constraintlayout
implementation libs.androidx.appcompat
implementation libs.androidx.appcompat
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
@@ -170,13 +168,14 @@ dependencies {
//播放器
//腾讯直播sdk
// api('com.tencent.liteav:LiteAVSDK_Professional:10.9.0.13102')
api('com.google.android.exoplayer:exoplayer-core:2.19.1')
api('com.google.android.exoplayer:exoplayer-ui:2.19.1')
// api('com.google.android.exoplayer:exoplayer-core:2.19.1')
// api('com.google.android.exoplayer:exoplayer-ui:2.19.1')
api("com.egame.vap:animplayer:2.0.8")
api("com.liulishuo.okdownload:okdownload:1.0.7")
api('com.zlc.glide:webpdecoder:1.6.4.9.0')
api('com.jungly:gridPasswordView:0.3')
// 带有气泡的提示框目前没有使用暂不使用使用位置是在RoomTipsView
api('com.cpiz.bubbleview:bubbleview:1.0.2')
// 集成音频 SDK声网

File diff suppressed because one or more lines are too long

View File

@@ -165,6 +165,11 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
adjustFontScale(getResources().getConfiguration());
CrashHandler.init(this);
if (currentEnvironment.getShelf()==1){
if (SpUtil.getShelf()!=1) {
SpUtil.setShelf(1);
}
}
}
@@ -438,7 +443,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
initARouter();
if (SpUtil.isAgreePolicy()) {
checkInEmulator();
UtilConfig.checkInEmulator();
// UtilConfig.checkInEmulator();
AgoraManager.getInstance(this);
AgoraManager.init(currentEnvironment.getSwSdkAppId());
MessageListenerSingleton.getInstance();

View File

@@ -49,12 +49,24 @@ public class DateSelectDialog extends BaseBottomSheetDialog<MeDialogDateSelectBi
@Override
public void initData() {
// setYear();
// mBinding.pickerViewYear.setSelectedItemPosition(yearList.size());
// setMonth(TimeUtils.getYear());
// mBinding.pickerViewMonth.setSelectedItemPosition(monthList.size());
// setDay(TimeUtils.getYear(), TimeUtils.getMonth());
// mBinding.pickerViewDay.setSelectedItemPosition(dayList.size());
setYear();
mBinding.pickerViewYear.setSelectedItemPosition(yearList.size());
setMonth(TimeUtils.getYear());
mBinding.pickerViewMonth.setSelectedItemPosition(monthList.size());
setDay(TimeUtils.getYear(), TimeUtils.getMonth());
mBinding.pickerViewDay.setSelectedItemPosition(dayList.size());
int defaultYearPos = yearList.size() - 1; // 默认选中最新的年份16年前
mBinding.pickerViewYear.setSelectedItemPosition(defaultYearPos);
// 获取默认年份
int defaultYear = yearList.get(defaultYearPos).getDate();
setMonth(defaultYear);
mBinding.pickerViewMonth.setSelectedItemPosition(0);
setDay(defaultYear, 1);
mBinding.pickerViewDay.setSelectedItemPosition(0);
}
public void setData(String y, String m, String d) {
@@ -124,41 +136,88 @@ public class DateSelectDialog extends BaseBottomSheetDialog<MeDialogDateSelectBi
private List<DateBean> getDay(int year, int month) {
int day = TimeUtils.getDaysByYearMonth(year, month);
if (year == TimeUtils.getYear() && month == TimeUtils.getMonth()) {
day = TimeUtils.getDay();
// int day = TimeUtils.getDaysByYearMonth(year, month);
// if (year == TimeUtils.getYear() && month == TimeUtils.getMonth()) {
// day = TimeUtils.getDay();
// }
// List<DateBean> dayList = new ArrayList<>();
// for (int i = 1; i <= day; i++) {
// if (i <= 9) {
// dayList.add(new DateBean("0" + i, i));
// } else {
// dayList.add(new DateBean(String.valueOf(i), i));
// }
// }
int dayLimit = TimeUtils.getDaysByYearMonth(year, month);
int currentYear = TimeUtils.getYear();
int currentMonth = TimeUtils.getMonth();
int currentDay = TimeUtils.getDay();
// 如果是最大年份且是最大月份,则日期不能超过当前日期
if (year == currentYear - 16 && month == currentMonth) {
dayLimit = currentDay;
}
List<DateBean> dayList = new ArrayList<>();
for (int i = 1; i <= day; i++) {
for (int i = 1; i <= dayLimit; i++) {
if (i <= 9) {
dayList.add(new DateBean("0" + i, i));
} else {
dayList.add(new DateBean(String.valueOf(i), i));
}
}
return dayList;
}
private List<DateBean> getMonth(int year) {
List<DateBean> mothList = new ArrayList<>();
int month = 12;
if (year == TimeUtils.getYear()) {
month = TimeUtils.getMonth();
// List<DateBean> mothList = new ArrayList<>();
// int month = 12;
// if (year == TimeUtils.getYear()) {
// month = TimeUtils.getMonth();
// }
// for (int i = 1; i <= month; i++) {
// if (i <= 9) {
// mothList.add(new DateBean("0" + i, i));
// } else {
// mothList.add(new DateBean(String.valueOf(i), i));
// }
// }
List<DateBean> monthList = new ArrayList<>();
int currentYear = TimeUtils.getYear();
int currentMonth = TimeUtils.getMonth();
int monthLimit = 12;
// 如果是最大年份16年前则月份不能超过当前月份
if (year == currentYear - 16) {
monthLimit = currentMonth;
}
for (int i = 1; i <= month; i++) {
for (int i = 1; i <= monthLimit; i++) {
if (i <= 9) {
mothList.add(new DateBean("0" + i, i));
monthList.add(new DateBean("0" + i, i));
} else {
mothList.add(new DateBean(String.valueOf(i), i));
monthList.add(new DateBean(String.valueOf(i), i));
}
}
return mothList;
return monthList;
}
private List<DateBean> getYear() {
int year = TimeUtils.getYear();
// int year = TimeUtils.getYear();
// List<DateBean> yearList = new ArrayList<>();
// for (int i = 1900; i <= year; i++) {
// yearList.add(new DateBean(String.valueOf(i), i));
// }
// return yearList;
int currentYear = TimeUtils.getYear();
int minYear = currentYear - 100; // 最小年份设为100年前
int maxYear = currentYear - 16; // 最大年份设为16年前
List<DateBean> yearList = new ArrayList<>();
for (int i = 1900; i <= year; i++) {
for (int i = minYear; i <= maxYear; i++) {
yearList.add(new DateBean(String.valueOf(i), i));
}
return yearList;

View File

@@ -32,4 +32,6 @@ public class SPConstants {
public static final String USER_INFO = "userInfo";
public static final String FLOATING_SCREEN = "floatingScreen";
public static final String SHELF="shelf";
}

View File

@@ -323,6 +323,14 @@ public class SpUtil {
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.EMQTT_CLIENT_ID, clientId);
}
public static void setShelf(int shelf){
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.SHELF, shelf);
}
public static int getShelf(){
int shelf=SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getInt(SPConstants.SHELF);
return shelf;
}
public static String getEmqttId() {
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.EMQTT_CLIENT_ID);
return s;

View File

@@ -14,7 +14,8 @@ public enum EnvironmentEnum {
1600096860,
"3e8f3add448d4692bc1d04c75ffe801b",
"tcp://81.70.45.221",
"https://vespa.qxyushen.top/h5"),
"https://vespa.qxyushen.top/h5",
1),
TEST(//测试环境
"https://test.vespa.qxyushen.top/",
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
@@ -27,7 +28,8 @@ public enum EnvironmentEnum {
1600096890,
"02f7339ec98947deaeab173599891932",
"tcp://1.13.181.248",
"https://tmd.xscmmidi.site/h5");
"https://test.vespa.qxyushen.top/h5",
1);
private final String serverUrl;//服务器地址
private final String ALI_AUTH_KEY;//阿里云授权key
@@ -47,10 +49,11 @@ public enum EnvironmentEnum {
private final String mqttUrl;//MQTT服务器地址
private final String H5Url;//h5地址
private final int shelf;//是否上架0平台更新1上架发布到对应的应用商城
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,
int sdkAppId, String swSdkAppId,String mqttUrl,String H5Url) {
int sdkAppId, String swSdkAppId,String mqttUrl,String H5Url,int shelf) {
this.serverUrl = serverUrl;
this.ALI_AUTH_KEY = ALI_AUTH_KEY;
this.ossEndPoint = ossEndPoint;
@@ -63,6 +66,11 @@ public enum EnvironmentEnum {
this.swSdkAppId = swSdkAppId;
this.mqttUrl = mqttUrl;
this.H5Url = H5Url;
this.shelf = shelf;
}
public int getShelf() {
return shelf;
}
public String getH5Url() {

View File

@@ -40,6 +40,7 @@ import com.xscm.moduleutil.presenter.RewardGiftContacts;
import com.xscm.moduleutil.presenter.RewardGiftPresenter;
import com.xscm.moduleutil.utils.ColorManager;
import com.xscm.moduleutil.utils.ImageUtils;
import com.xscm.moduleutil.utils.SpUtil;
import com.xscm.moduleutil.widget.GifAvatarOvalView;
import com.xscm.moduleutil.widget.floatingView.IFloatingView;
@@ -201,12 +202,16 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
@Override
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
// giftLabelBeanList = new ArrayList<>();
// giftLabelBeanList.addAll(giftLabelBeans);
// GiftLabelBean giftLabelBean = new GiftLabelBean();
// giftLabelBean.setId("0");
// giftLabelBean.setName("背包");
// giftLabelBeans.add(0, giftLabelBean);
if (giftLabelBeans == null) return;
if (SpUtil.getShelf()==1){
for (GiftLabelBean giftLabelBean1 : giftLabelBeans){
if (giftLabelBean1.getId().equals("2")){
giftLabelBeans.remove(giftLabelBean1);
break;
}
}
}
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans,fragmentList,""));
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
mBinding.slidingTabLayout.setCurrentTab(0);

View File

@@ -20,6 +20,7 @@
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginEnd="@dimen/dp_12"
tools:background="@color/black"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@mipmap/room_ic_wheat_default"

View File

@@ -1682,10 +1682,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
val pitList = mRoomInfoResp!!.room_info.pit_list
if (pitList != null && !pitList.isEmpty()) {
// pitMap.clear() // 避免数据累积
// for (roomPitBean in pitList) {
// pitMap[roomPitBean.pit_number] = roomPitBean
// }
if (text == null) {
return
@@ -1708,17 +1704,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
) {
mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
// if (messageEvent.text.user_id .equals(SpUtil.getUserId().toString()) && "9" == toPitNumber) {
// if (customMusicFloatingView != null) {
// customMusicFloatingView!!.destroy()
// AgoraManager.getInstance(this@RoomActivity).desMusic()
// isMusic = false
// }
// mBinding!!.roomTop.rl.visibility = View.GONE
// ivSoundEffects(false)
// }
if ("9" == toPitNumber && messageEvent.text.user_id.equals(SpUtil.getUserId().toString())) {
mBinding!!.roomTop.rl.visibility = View.VISIBLE
ivSoundEffects(true)
@@ -1731,86 +1716,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
mBinding!!.roomTop.rl.visibility = View.GONE
ivSoundEffects(false)
}
// if (TextUtils.isEmpty(fromPitNumber) || TextUtils.isEmpty(toPitNumber)) {
// return
// }
////
// if (mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) {
// LogUtils.e("Room info is null")
// return
// }
////
// val pitList = mRoomInfoResp!!.room_info.pit_list
// if (pitList == null || pitList.isEmpty()) {
// LogUtils.e("pit_list is null or empty")
// return
// }
////
// var fromBean: RoomPitBean? = null
// var toBean: RoomPitBean? = null
// val pitListCopy: MutableList<RoomPitBean> = ArrayList()
//
// for (bean in pitList) {
// if (bean == null) continue
// if (fromPitNumber == bean.pit_number) {
// fromBean = bean
// pitListCopy.add(bean)
// } else if (toPitNumber == bean.pit_number) {
// toBean = bean
// pitListCopy.add(bean)
// }
// }
//
// if (fromBean == null || toBean == null) {
// LogUtils.e("Cannot find pit number: from=$fromPitNumber, to=$toPitNumber")
// return
// }
//
// // 交换 pit_number
// val temp = fromBean.pit_number
// fromBean.pit_number = toBean.pit_number
// toBean.pit_number = temp
//
// // 构造新的 pitList
// val newPitList: MutableList<RoomPitBean> = ArrayList()
// for (bean in pitList) {
// if (!pitListCopy.contains(bean)) {
// newPitList.add(bean)
// }
// }
// newPitList.add(fromBean)
// newPitList.add(toBean)
//// 排序 - 更简洁的 Kotlin 写法
// newPitList.sortWith(compareBy {
// try {
// it.pit_number.toInt()
// } catch (e: NumberFormatException) {
// it.pit_number
// }
// })
//
// mRoomInfoResp!!.room_info.pit_list = newPitList
//
// // 更新当前用户 pit_number
// if (mRoomInfoResp!!.user_info != null) {
// val currentUserId = SpUtil.getUserId().toString()
// val fromUserId = fromBean.user_id
// val toUserId = toBean.user_id
//
// if (fromUserId != null && fromUserId == currentUserId) {
// try {
// mRoomInfoResp!!.user_info.pit_number = fromBean.pit_number.toInt()
// } catch (e: NumberFormatException) {
// LogUtils.e("Invalid pit number: " + toBean.pit_number)
// }
// } else if (toUserId != null && toUserId == currentUserId) {
// try {
// mRoomInfoResp!!.user_info.pit_number = fromBean.pit_number.toInt()
// } catch (e: NumberFormatException) {
// LogUtils.e("Invalid pit number: " + toBean.pit_number)
// }
// }
// }
dispatchRoomEvent(messageEvent)
}
@@ -3091,16 +2996,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
fun setRoleType(roleType: Int, pit_number: Int) {
val rl_voice = mBinding?.rlVoive // 注意:原拼写错误已修正 喇叭
val rl_voice = mBinding?.rlVoive // 喇叭
val rl_mic = mBinding?.rlMic // 麦克风
val rl_more = mBinding?.rlMore //PK
val rl_misc = mBinding?.rlMisc //音乐
val rl_more = mBinding?.rlMore // PK按钮
val rl_misc = mBinding?.rlMisc // 音乐按钮
val rl_message = mBinding?.rlMessage // 消息按钮
// 默认隐藏所有按钮
rl_voice?.visibility = View.GONE
rl_mic?.visibility = View.GONE
rl_more?.visibility = View.GONE
rl_misc?.visibility = View.GONE
rl_mic?.visibility = View.GONE
// 空指针保护
if (mRoomInfoResp == null || mRoomInfoResp!!.room_info == null || mRoomInfoResp!!.user_info == null) {
@@ -3111,83 +3017,92 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
val labelId = mRoomInfoResp!!.room_info.label_id
val userPitNumber = mRoomInfoResp!!.user_info.pit_number
// 特殊房间类型处理(优先级最高)
// 情况1: typeId = 6 时,只显示消息按钮
if ("6" == typeId) {
mBinding?.rlMessage?.visibility = View.GONE
return // 全部隐藏,无需继续处理
rl_message?.visibility = View.GONE
return
} else {
mBinding?.rlMessage?.visibility = View.VISIBLE
rl_message?.visibility = View.VISIBLE
}
// 根据角色类型显示按钮
// 情况2: 根据角色类型显示按钮
when (roleType) {
1, 2, 3 -> {
// 角色类型1,2,3显示全部按钮但受其他条件限制
rl_voice?.visibility = View.VISIBLE
rl_mic?.visibility =
if (pit_number != 0) View.VISIBLE else View.GONE
rl_more?.visibility =
if (pit_number == 9) View.VISIBLE else View.GONE
// 麦克风显示条件
if (userPitNumber != 0) {
rl_mic?.visibility = View.VISIBLE
}
// PK按钮显示条件typeId=1且labelId=1且userPitNumber=9
if ("1" == typeId && "1" == labelId && userPitNumber == 9) {
rl_more?.visibility = View.VISIBLE
}
// 音乐按钮不显示
rl_misc?.visibility = View.GONE
}
0 -> {
// 角色类型0显示喇叭和麦克风
rl_voice?.visibility = View.VISIBLE
rl_mic?.visibility =
if (pit_number != 0) View.VISIBLE else View.GONE
// 麦克风显示条件
if (userPitNumber != 0) {
rl_mic?.visibility = View.VISIBLE
}
rl_misc?.visibility = View.GONE
}
5 -> {
// 角色类型5只显示喇叭
rl_voice?.visibility = View.VISIBLE
rl_more?.visibility = View.GONE
rl_misc?.visibility = View.GONE
}
else -> {}
}
if (roleType != 5) {
rl_misc?.visibility = View.GONE
if (userPitNumber == 9) {
rl_more?.visibility = View.VISIBLE
else -> {
// 其他角色类型不显示任何功能按钮
}
}
// label_id 和 type_id 联合判断
if (mutableListOf<String>("1").contains(typeId) && "1" == labelId) {
rl_more?.visibility = View.VISIBLE
rl_misc?.visibility = View.GONE
}else{
rl_more?.visibility = View.GONE
rl_misc?.visibility = View.GONE
}
// mic 显示逻辑
if (userPitNumber > 0) {
// 情况3: 麦克风的特殊显示逻辑
when {
userPitNumber > 0 -> {
rl_mic?.visibility = View.VISIBLE
if (CommonAppContext.getInstance().isMai) {
switchMic(1)
switchMic(1) // 打开麦克风
} else {
switchMic(2)
switchMic(2) // 关闭麦克风
}
} else {
if (pit_number == 888) {
}
pit_number == 888 -> {
rl_mic?.visibility = View.VISIBLE
switchMic(2)
} else if (pit_number == -1) {
rl_mic?.visibility = View.VISIBLE // 原代码此处缺少 View. 前缀,已补全
switchMic(1)
} else {
switchMic(2) // 关闭麦克风
}
pit_number == -1 -> {
rl_mic?.visibility = View.VISIBLE
switchMic(1) // 打开麦克风
}
else -> {
rl_mic?.visibility = View.GONE
switchMic(2)
switchMic(2) // 关闭麦克风
}
}
// 情况4: 特殊typeId隐藏PK和音乐按钮
if ("7" == typeId || "2" == typeId) {
rl_more?.visibility = View.GONE
rl_misc?.visibility = View.GONE
}
// 最终确认typeId不等于1的情况都不展示PK按钮
if ("1" != typeId) {
rl_more?.visibility = View.GONE
}
}
fun isMute(is_mute: Int) {

View File

@@ -40,6 +40,7 @@ import com.xscm.moduleutil.activity.WebViewActivity;
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.GiftLabelBean;
import com.xscm.moduleutil.bean.GiftNumBean;
import com.xscm.moduleutil.bean.GiftPackBean;
@@ -734,12 +735,23 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
@Override
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
if (giftLabelBeans == null) return;
giftLabelBeanList = new ArrayList<>();
giftLabelBeanList.addAll(giftLabelBeans);
GiftLabelBean giftLabelBean = new GiftLabelBean();
giftLabelBean.setId("0");
giftLabelBean.setName("背包");
giftLabelBeans.add(0, giftLabelBean);
if (SpUtil.getShelf()==1){
for (GiftLabelBean giftLabelBean1 : giftLabelBeans){
if (giftLabelBean1.getId().equals("2")){
giftLabelBeans.remove(giftLabelBean1);
break;
}
}
}
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList, roomId));
mBinding.viewPager.setOffscreenPageLimit(0);
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);

View File

@@ -28,6 +28,7 @@ import com.hjq.toast.ToastUtils;
import com.xscm.moduleutil.activity.WebViewActivity;
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.base.RoomManager;
import com.xscm.moduleutil.bean.RelationCardBean;
import com.xscm.moduleutil.bean.UserInfo;
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
@@ -127,6 +128,19 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
} else {
mBinding.roomDian.setVisibility(View.VISIBLE);
}
if (isPk){
mBinding.roomBo.setVisibility(GONE);
if (isNum==1){
mBinding.imGs.setVisibility(GONE);
}else {
mBinding.imGs.setVisibility(VISIBLE);
}
} else {
mBinding.roomBo.setVisibility(View.VISIBLE);
mBinding.imGs.setVisibility(GONE);
}
}
@SuppressLint("UseCompatLoadingForDrawables")
@@ -144,6 +158,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
mBinding.roomRlGift.setOnClickListener(this::onClick);
mBinding.roomJb.setOnClickListener(this::onClick);
mBinding.tvZb.setOnClickListener(this::onClick);
mBinding.imGs.setOnClickListener(this::onClick);
mBinding.textView1.setOnClickListener(this::onClick);
mBinding.textView2.setOnClickListener(this::onClick);
@@ -154,6 +169,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
mBinding.roomMCz.setTextColor(ColorManager.getInstance().getButtonColorInt());
mBinding.moreButton.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
}
@@ -234,6 +251,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
dianj(2);
}else if (id==R.id.im_qml){
MvpPre.clearUserCharm(room_id, user_id);
}else if (id==R.id.im_gs){
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), room_id, "",null);
}
}
@@ -631,57 +650,12 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
break;
}
if (isPk){
mBinding.roomBo.setVisibility(GONE);
}
// switch (type) {
// case 1: // 房主
// case 2: // 管理员
// case 3: // 主持
// if (isSelf) {
// mBinding.roomDian.setVisibility(View.GONE);
// mBinding.roomJb.setVisibility(View.GONE);
// mBinding.roomLh.setVisibility(View.GONE);
// mBinding.roomBo.setVisibility(View.GONE);
// } else {
// mBinding.roomDian.setVisibility(View.VISIBLE);
// mBinding.roomJb.setVisibility(View.GONE);
// mBinding.roomLh.setVisibility(View.GONE);
// mBinding.roomBo.setVisibility(View.VISIBLE);
// }
// break;
// case 4: // 普通用户
// mBinding.roomDian.setVisibility(View.GONE);
// if (isSelf) {
// mBinding.roomJb.setVisibility(View.GONE);
// mBinding.roomLh.setVisibility(View.GONE);
// mBinding.roomBo.setVisibility(View.GONE);
// mBinding.roomMCz.setVisibility(View.VISIBLE);
// } else {
// mBinding.roomJb.setVisibility(View.VISIBLE);
// mBinding.roomLh.setVisibility(View.VISIBLE);
// mBinding.roomBo.setVisibility(View.VISIBLE);
// mBinding.roomMCz.setVisibility(View.GONE);
// }
// break;
// case 0:
// mBinding.roomDian.setVisibility(View.GONE);
// if (isSelf) {
// mBinding.roomJb.setVisibility(View.GONE);
// mBinding.roomLh.setVisibility(View.GONE);
// mBinding.roomBo.setVisibility(View.GONE);
// mBinding.roomMCz.setVisibility(View.VISIBLE);
// } else {
// mBinding.roomJb.setVisibility(View.VISIBLE);
// mBinding.roomLh.setVisibility(View.VISIBLE);
// mBinding.roomBo.setVisibility(View.VISIBLE);
// mBinding.roomMCz.setVisibility(View.GONE);
// }
// default:
// // 默认处理
// break;
// }
}
@Override

View File

@@ -511,10 +511,6 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
String pitNumber = messageEvent.getText().getPit_number();
int userId = fromUserInfo.getUser_id();
// List<RoomPitBean> pitList = roomInfoResp.getRoom_info().getPit_list();
// if (pitList != null && !pitList.isEmpty()) {
// try {
// RoomPitBean pitBean = pitList.get(Integer.parseInt(pitNumber) - 1);
RoomPitBean pitBean = mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean;
pitBean.setUser_id(userId + "");
pitBean.setAvatar(fromUserInfo.getAvatar());
@@ -522,37 +518,20 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
pitBean.setSex(fromUserInfo.getSex() + "");
pitBean.setCharm(fromUserInfo.getCharm());
pitBean.setDress(fromUserInfo.getDress());
// pitList.set(Integer.parseInt(pitNumber) - 1, pitBean);
mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean = pitBean;
if (userId == SpUtil.getUserId() && pitNumber.equals("9")) {
myPitNumber = 9;
mWheatViews.get(Integer.parseInt(pitNumber) - 1).setData(pitBean);
if (userId == SpUtil.getUserId() ) {
myPitNumber=Integer.parseInt(pitNumber);
if (pitNumber.equals("9")){
configGameOptionBtn();
// if (getActivity() instanceof RoomActivity) {
// ((RoomActivity) getActivity()).ivSoundEffects(true);
// }
}
for (int i = 0; i < mWheatViews.size(); i++) {
if (i == Integer.parseInt(pitNumber) - 1) {
mWheatViews.get(i).setData(pitBean);
break;
}
}
// } catch (NumberFormatException e) {
// // Handle exception
// }
// }
initUserViewMap();
}
public void event1004(RoomMessageEvent messageEvent) {
String pitNumber = messageEvent.getText().getPit_number();
// List<RoomPitBean> pitList = roomInfoResp.getRoom_info().getPit_list();
// if (pitList != null && !pitList.isEmpty()) {
// try {
// RoomPitBean pitBean = pitList.get(Integer.parseInt(pitNumber) - 1);
RoomPitBean pitBean = mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean;
pitBean.setUser_id("");
pitBean.setAvatar("");
@@ -560,24 +539,18 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
pitBean.setSex("");
pitBean.setCharm("");
pitBean.setDress("");
mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean = pitBean;
mWheatViews.get(Integer.parseInt(pitNumber) - 1).setData(pitBean);
if (messageEvent.getText().getFromUserInfo()==null){
return;
}
if (SpUtil.getUserId()==messageEvent.getText().getFromUserInfo().getUser_id()){
myPitNumber = -1;
if (pitNumber.equals("9")) {
myPitNumber = 0;
configGameOptionBtn();
// if (getActivity() instanceof RoomActivity) {
// ((RoomActivity) getActivity()).ivSoundEffects(false);
// }
}
for (int i = 0; i < mWheatViews.size(); i++) {
if (i == Integer.parseInt(pitNumber) - 1) {
mWheatViews.get(i).setData(pitBean);
break;
}
// }
// } catch (NumberFormatException e) {
// // Handle exception
// }
}
initUserViewMap();
}
@@ -635,30 +608,10 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
bean.setUser_code("");
bean.setDress_picture("");
view.setData(bean);
// roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(view.pitBean.getPit_number()) - 1, bean);
}
}
}
}
// for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
// RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
// if (roomPitBean.getPit_number().equals("7") || roomPitBean.getPit_number().equals("8")) {
// continue;
// }
// if (Integer.parseInt(!roomPitBean.getPit_number().isEmpty() ? roomPitBean.getPit_number() : "0") > 10) {
// continue;
// }
//
// RoomFriendshipWheatView object = mWheatViews.get(Integer.parseInt(roomPitBean.getPit_number()) - 1);
//
// if (object != null) {
// object.setData(roomPitBean);
// } else {
// continue;
// }
// }
}
// 在 initData() 方法中初始化映射关系
@@ -716,70 +669,6 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
}
}
// if (messageEvent.getText().getToUserInfos()!=null && messageEvent.getText().getToUserInfos().size()>0){
// for (int i = 0; i < messageEvent.getText().getToUserInfos().size(); i++) {
// UserInfo toUserInfo = messageEvent.getText().getToUserInfos().get(i);
//
// }
// }else {
//
//
// RoomPitBean pitBean = mBinding.wheatView9.pitBean;
// if (pitBean.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// mBinding.wheatView9.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// RoomPitBean pitBean1 = mBinding.wheatView10.pitBean;
// if (pitBean1.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean1.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// mBinding.wheatView10.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView10.setData(pitBean1);
// return;
// }
// RoomPitBean pitBean2 = mBinding.wheatView1.pitBean;
// if (pitBean2.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean2.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView1.setData(pitBean2);
// mBinding.wheatView1.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// RoomPitBean pitBean3 = mBinding.wheatView2.pitBean;
// if (pitBean3.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean3.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView2.setData(pitBean3);
// mBinding.wheatView2.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// RoomPitBean pitBean4 = mBinding.wheatView3.pitBean;
// if (pitBean4.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean4.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView3.setData(pitBean4);
// mBinding.wheatView3.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// RoomPitBean pitBean5 = mBinding.wheatView4.pitBean;
// if (pitBean5.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean5.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView4.setData(pitBean5);
// mBinding.wheatView4.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// RoomPitBean pitBean6 = mBinding.wheatView5.pitBean;
// if (pitBean6.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean6.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView5.setData(pitBean6);
// mBinding.wheatView5.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// RoomPitBean pitBean7 = mBinding.wheatView6.pitBean;
// if (pitBean7.getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
// pitBean7.setCharm(messageEvent.getText().getToUserInfo().getCharm());
//// mBinding.wheatView6.setData(pitBean7);
// mBinding.wheatView6.setCharm(messageEvent.getText().getToUserInfo().getCharm());
// return;
// }
// }
}
public void event1058(RoomMessageEvent messageEvent) {
@@ -1054,29 +943,6 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
// 可以根据需要更新其他UI元素
}
/**
* 清除魅力值
*/
public void clearCharm() {
// 清除魅力值显示
}
/**
* 设置座位魅力值
*
* @param model 用户数据模型
*/
public void setSeatCharmWithUser(Object model) { // 使用实际的用户模型类
// 设置魅力值显示
}
// 用户信息改变
public void roomUserInfoDidChanged(UserInfo userInfo) {
}
/**
* 心动数值变化
*/
@@ -1098,8 +964,6 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
boolean isHaveMe = false;
if (myPitNumber == 9 || myPitNumber == 10) {
isHaveMe = true;
} else {
myPitNumber = -1;
}
// 更新麦位显示

View File

@@ -1048,7 +1048,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
if (isFastDoubleClick(pitBean.getUser_id(), pitBean.getPit_number())) {
return;
}
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id(), pitNumber + "", getHostUser(), true, 3, isNumberWhether(), getChildFragmentManager());
RoomUserInfoFragment.show(roomInfoRespPk.getRoom_info().getRoom_id(), pitBean.getUser_id(), pitNumber + "", getHostUser(), true, 3, isNumberWhether(), getChildFragmentManager());
// 点击的麦位是当前麦位
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
}
@@ -1257,11 +1257,20 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
}
public void event1021(RoomMessageEvent message) {
if (roomInfoRespPk != null || roomInfoRespPk.getPk_info() != null) {
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()){
pitBean.setCharm("0");
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
wheatLayoutManager1.updateSingleCharm(pitBean, Integer.parseInt(pitBean.getPit_number()), 1);
}
}
}else {
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
pitBean.setCharm("0");
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
}
}
}
// TODO: 2025/9/12 清除个人魅力
public void event1059(RoomMessageEvent message) {

View File

@@ -4,6 +4,8 @@ import static com.blankj.utilcode.util.ActivityUtils.startActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Handler;
import android.sax.ElementListener;
import android.view.View;
import androidx.appcompat.app.AlertDialog;
@@ -28,6 +30,7 @@ import com.xscm.moduleutil.utils.config.ConfigManager;
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
import com.xscm.moduleutil.utils.config.EnvironmentPrefs;
import com.xscm.moduleutil.widget.CommonAppConfig;
/**
* @author qx
* @data 2025/8/14
@@ -35,6 +38,16 @@ import com.xscm.moduleutil.widget.CommonAppConfig;
*/
public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivitySettingBinding> implements SettingConacts.View {
private int clickCount = 0;
private static final int REQUIRED_CLICKS = 6;
private Handler handler = new Handler();
private Runnable resetRunnable = new Runnable() {
@Override
public void run() {
clickCount = 0; // 自动重置计数器
}
};
private static final long RESET_DELAY = 1000; // 1秒无操作自动重置
protected void initData() {
mBinding.tvBbh.setText(CommonAppConfig.getInstance().getVersion());
@@ -60,6 +73,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
mBinding.llTcdl.setOnClickListener(this::onClick);
mBinding.llZhxiao.setOnClickListener(this::onClick);
mBinding.llGywm.setOnClickListener(this::onClick);
mBinding.llBbh.setOnClickListener(this::onClick);
}
private void onClick(View view) {
@@ -162,8 +176,24 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
startActivity(new Intent(this, AboutUsActivity.class));
} else if (view.getId() == R.id.ll_bbh) {
if (SpUtil.getShelf()==1) {
// 移除之前的重置任务
handler.removeCallbacks(resetRunnable);
clickCount++;
if (clickCount >= REQUIRED_CLICKS) {
// 写入内存值
SpUtil.setShelf(0);
clickCount = 0;
ToastUtils.showShort("已经打开趣味玩法");
} else {
// 延迟重置计数器
handler.postDelayed(resetRunnable, RESET_DELAY);
}
}
}
}
private void showYouthModelDialog() {
YouthModelDialog youthModelDialog = new YouthModelDialog(this, null);
youthModelDialog.show();
@@ -177,6 +207,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
}
});
}
@Override
protected int getLayoutId() {
return R.layout.activity_setting;

View File

@@ -227,6 +227,15 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
public class userInd{
private int is_can_chat;//是否可以私聊1可以0不可以
private int can_chat_money;//需要充值的金额
private int userId;
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getIs_can_chat() {
return is_can_chat;