opt: notify-debugger-on-exception (#1750)

This commit is contained in:
My-Responsitories
2025-11-17 21:49:36 +08:00
committed by GitHub
parent 76c2de4394
commit 0f8166620e
14 changed files with 37 additions and 74 deletions

View File

@@ -26,7 +26,6 @@ import 'package:PiliPlus/utils/utils.dart';
import 'package:PiliPlus/utils/video_utils.dart';
import 'package:canvas_danmaku/canvas_danmaku.dart';
import 'package:easy_debounce/easy_throttle.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@@ -229,6 +228,7 @@ class LiveRoomController extends GetxController {
_msgStream = null;
}
@pragma('vm:notify-debugger-on-exception')
Future<void> prefetch() async {
final res = await LiveHttp.liveRoomDanmaPrefetch(roomId: roomId);
if (res['status']) {
@@ -238,9 +238,7 @@ class LiveRoomController extends GetxController {
list.cast<Map<String, dynamic>>().map(DanmakuMsg.fromPrefetch),
);
WidgetsBinding.instance.addPostFrameCallback(scrollToBottom);
} catch (e) {
if (kDebugMode) debugPrint(e.toString());
}
} catch (_) {}
}
}
}
@@ -337,6 +335,7 @@ class LiveRoomController extends GetxController {
..init();
}
@pragma('vm:notify-debugger-on-exception')
void _danmakuListener(dynamic obj) {
try {
// logger.i(' 原始弹幕消息 ======> ${jsonEncode(obj)}');
@@ -407,9 +406,7 @@ class LiveRoomController extends GetxController {
}
break;
}
} catch (_) {
if (kDebugMode) rethrow;
}
} catch (_) {}
}
final RxInt likeClickTime = 0.obs;