From 1392f353937df3b41f0c337919d3771662718f7c Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Fri, 20 Sep 2024 19:48:40 +0800 Subject: [PATCH] opt: showEpisodes --- lib/pages/video/detail/view.dart | 6 +++++- lib/plugin/pl_player/view.dart | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index cec77c88..9042cd49 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -526,6 +526,7 @@ class _VideoDetailPageState extends State playerController: plPlayerController!, ), ), + showEpisodes: showEpisodes, ), ); } else { @@ -1365,6 +1366,7 @@ class _VideoDetailPageState extends State playerController: plPlayerController!, ), ), + showEpisodes: showEpisodes, ), ); Widget autoChoose(Widget childWhenDisabled) { @@ -1480,7 +1482,9 @@ class _VideoDetailPageState extends State currentCid: cid, changeFucCall: videoIntroController.changeSeasonOrbangu, context: context, - scaffoldState: scaffoldKey.currentState, + scaffoldState: isFullScreen.value + ? videoDetailController.scaffoldKey.currentState + : scaffoldKey.currentState, ).buildShowBottomSheet(); } } diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index c4a031fc..6f060122 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -48,6 +48,7 @@ class PLVideoPlayer extends StatefulWidget { this.bottomList, this.customWidget, this.customWidgets, + this.showEpisodes, super.key, }); @@ -62,6 +63,7 @@ class PLVideoPlayer extends StatefulWidget { final Widget? customWidget; final List? customWidgets; + final Function? showEpisodes; @override State createState() => _PLVideoPlayerState(); @@ -363,14 +365,14 @@ class _PLVideoPlayerState extends State .episodes!); changeFucCall = bangumiIntroController!.changeSeasonOrbangu; } - ListSheet( - episodes: episodes, - bvid: bvid, - aid: IdUtils.bv2av(bvid), - currentCid: currentCid, - changeFucCall: changeFucCall, - context: context, - ).buildShowBottomSheet(); + if (widget.showEpisodes != null) { + widget.showEpisodes!( + episodes, + bvid, + IdUtils.bv2av(bvid), + currentCid, + ); + } }, ), ),