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'); videoReplyCtr.queryReplyList(type: 'init');
} catch (_) {} } catch (_) {}
this.bvid = bvid; this.bvid = bvid;
lastPlayCid.value = cid;
await queryVideoIntro(); await queryVideoIntro();
} }
} }

View File

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

View File

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