mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 07:06:14 +08:00
opt: live danmaku
This commit is contained in:
@@ -115,16 +115,15 @@ class VideoReplyReplyController extends CommonController
|
||||
begin: Theme.of(Get.context!).colorScheme.onInverseSurface,
|
||||
end: Theme.of(Get.context!).colorScheme.surface,
|
||||
).animate(controller!);
|
||||
() async {
|
||||
await Future.delayed(const Duration(milliseconds: 200));
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
itemScrollCtr.jumpTo(
|
||||
index: hasRoot ? index! + 3 : index! + 1, alignment: 0.25,
|
||||
// duration: const Duration(milliseconds: 200),
|
||||
index: hasRoot ? index! + 3 : index! + 1,
|
||||
alignment: 0.25,
|
||||
);
|
||||
await Future.delayed(const Duration(milliseconds: 800));
|
||||
await controller?.forward();
|
||||
index = null;
|
||||
}();
|
||||
});
|
||||
}
|
||||
id = null;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
@override
|
||||
void dispose() {
|
||||
if (!Get.previousRoute.startsWith('/video')) {
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
PlPlayerController.setPlayCallBack(null);
|
||||
}
|
||||
videoDetailController.positionSubscription?.cancel();
|
||||
@@ -310,7 +310,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
void didPushNext() async {
|
||||
// _bufferedListener?.cancel();
|
||||
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
|
||||
videoDetailController.positionSubscription?.cancel();
|
||||
videoIntroController.canelTimer();
|
||||
@@ -344,13 +344,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
plPlayerController
|
||||
?.setCurrBrightness(videoDetailController.brightness!);
|
||||
if (videoDetailController.brightness != -1.0) {
|
||||
ScreenBrightness()
|
||||
.setScreenBrightness(videoDetailController.brightness!);
|
||||
ScreenBrightness().setApplicationScreenBrightness(
|
||||
videoDetailController.brightness!);
|
||||
} else {
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
}
|
||||
} else {
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
}
|
||||
}
|
||||
super.didPopNext();
|
||||
|
||||
Reference in New Issue
Block a user