fix: episode panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-02 15:45:12 +08:00
parent 6ab72b65aa
commit 9bbd934f8e
5 changed files with 36 additions and 11 deletions

View File

@@ -143,7 +143,6 @@ class VideoIntroController extends GetxController
if (videoDetail.value.ugcSeason?.id == data.ugcSeason?.id) {
// keep reversed season
data.ugcSeason = videoDetail.value.ugcSeason;
data.isSeasonReversed = videoDetail.value.isSeasonReversed;
}
if (videoDetail.value.cid == data.cid) {
// keep reversed pages

View File

@@ -45,10 +45,10 @@ class _PagesPanelState extends State<PagesPanel> {
@override
void initState() {
super.initState();
_videoDetailController =
Get.find<VideoDetailController>(tag: widget.heroTag);
if (widget.list == null) {
cid = widget.videoIntroController.lastPlayCid.value;
_videoDetailController =
Get.find<VideoDetailController>(tag: widget.heroTag);
pageIndex = pages.indexWhere((Part e) => e.cid == cid);
_listener = _videoDetailController.cid.listen((int cid) {
this.cid = cid;
@@ -158,6 +158,12 @@ class _PagesPanelState extends State<PagesPanel> {
IdUtils.bv2av(widget.bvid),
widget.cover,
);
if (widget.list != null &&
widget.videoIntroController.videoDetail.value
.ugcSeason !=
null) {
_videoDetailController.seasonCid = pages.first.cid;
}
},
child: Padding(
padding: const EdgeInsets.symmetric(