王子贤 3 months ago
parent
commit
d0302ecc6b
4 changed files with 13 additions and 4 deletions
  1. 4
      android/app/build.gradle.kts
  2. 2
      lib/controller/setting/spread_controller.dart
  3. 10
      lib/im/im_manager.dart
  4. 1
      lib/pages/discover/live_room_page.dart

4
android/app/build.gradle.kts

@ -8,7 +8,9 @@ plugins {
android {
namespace = "com.juxinghe.touchme"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
// Use a specific NDK version that is available on the system
// If flutter.ndkVersion points to a missing/corrupted NDK, override it
ndkVersion = "27.0.12077973"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11

2
lib/controller/setting/spread_controller.dart

@ -137,7 +137,6 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
roseList.value = result.data.data!.records;
}
final response = await _userApi.getChatStaticsInfo();
print('canApply: 137');
if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data!;
if(roseList[activePay.value].liveDurationHours != null){
@ -147,7 +146,6 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
}
}
}
print('canApply: $canApply');
if(matchmakerFlag.value){
final index = roseList.indexWhere((item) => item.subCategory == GlobalData().userData!.matchmakerType!);
enableIndex.value = index >= 0 ? index : 0;

10
lib/im/im_manager.dart

@ -132,7 +132,15 @@ class IMManager {
},
),
);
EMClient.getInstance.chatManager.addMessageEvent(_chatHandlerKey, ChatMessageEvent(
onSuccess: (str, message){
Get.log('✅ [IMManager] 发送消息成功: $str');
},
onError: (str, message, err){
//code: 508
Get.log('❌ [IMManager] 发送消息失败: $err----$str');
},
));
_listenersRegistered = true;
if (Get.isLogEnable) {
Get.log('✅ [IMManager] 监听器注册成功');

1
lib/pages/discover/live_room_page.dart

@ -107,6 +107,7 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
Widget build(BuildContext context) {
return PopScope(
onPopInvokedWithResult: (bool didPop, Object? result) async {
SmartDialog.dismiss();
_overlayController.show();
Get.back();
},

Loading…
Cancel
Save