fix: 分p切换cid未更改

This commit is contained in:
guozhigq
2023-08-17 16:00:37 +08:00
parent d9a758464c
commit 592b32fc7a
3 changed files with 12 additions and 6 deletions

View File

@ -414,6 +414,7 @@ class VideoIntroController extends GetxController {
videoReplyCtr.queryReplyList(type: 'init');
} catch (_) {}
this.bvid = bvid;
lastPlayCid.value = cid;
await queryVideoIntro();
}
}

View File

@ -270,12 +270,16 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
// 合集
if (!loadingStatus &&
widget.videoDetail!.ugcSeason != null) ...[
SeasonPanel(
Obx(
() => SeasonPanel(
ugcSeason: widget.videoDetail!.ugcSeason!,
cid: widget.videoDetail!.pages!.first.cid,
cid: videoIntroController.lastPlayCid.value != 0
? videoIntroController.lastPlayCid.value
: widget.videoDetail!.pages!.first.cid,
sheetHeight: sheetHeight,
changeFuc: (bvid, cid, aid) => videoIntroController
.changeSeasonOrbangu(bvid, cid, aid),
),
)
],
if (!loadingStatus &&

View File

@ -38,6 +38,7 @@ class _SeasonPanelState extends State<SeasonPanel> {
item.cid,
item.aid,
);
currentIndex = i;
Get.back();
}