mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-11 20:00:12 +08:00
opt: notify-debugger-on-exception (#1750)
This commit is contained in:
committed by
GitHub
parent
76c2de4394
commit
0f8166620e
@@ -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;
|
||||
|
||||
@@ -190,6 +190,7 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
}
|
||||
|
||||
@pragma('vm:notify-debugger-on-exception')
|
||||
void setVideoHeight() {
|
||||
try {
|
||||
final isVertical = firstVideo.width != null && firstVideo.height != null
|
||||
@@ -243,9 +244,7 @@ class VideoDetailController extends GetxController
|
||||
animationController.forward(from: 1 - scrollCtr.offset / videoHeight);
|
||||
}
|
||||
}
|
||||
} catch (_) {
|
||||
if (kDebugMode) rethrow;
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
void scrollListener() {
|
||||
@@ -1992,6 +1991,7 @@ class VideoDetailController extends GetxController
|
||||
);
|
||||
}
|
||||
|
||||
@pragma('vm:notify-debugger-on-exception')
|
||||
Future<void> onCast() async {
|
||||
SmartDialog.showLoading();
|
||||
final res = await VideoHttp.tvPlayUrl(
|
||||
@@ -2021,9 +2021,7 @@ class VideoDetailController extends GetxController
|
||||
tag: heroTag,
|
||||
).videoDetail.value.title;
|
||||
}
|
||||
} catch (_) {
|
||||
if (kDebugMode) rethrow;
|
||||
}
|
||||
} catch (_) {}
|
||||
if (kDebugMode) {
|
||||
debugPrint(title);
|
||||
}
|
||||
|
||||
@@ -209,6 +209,7 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
||||
}
|
||||
|
||||
late final int? vipStatus = Pref.userInfoCache?.vipStatus;
|
||||
@pragma('vm:notify-debugger-on-exception')
|
||||
bool _onDownload({
|
||||
required int index,
|
||||
required ugc.BaseEpisodeItem episode,
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:PiliPlus/utils/request_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
|
||||
import 'package:fixnum/fixnum.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -102,6 +101,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
|
||||
ExtendedNestedScrollController? nestedController;
|
||||
|
||||
@pragma('vm:notify-debugger-on-exception')
|
||||
void jumpToItem(int index) {
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||
animController.forward(from: 0);
|
||||
@@ -115,9 +115,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
scrollController.jumpTo(offset);
|
||||
}
|
||||
}
|
||||
} catch (_) {
|
||||
if (kDebugMode) rethrow;
|
||||
}
|
||||
} catch (_) {}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user