mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: bangumi like/coin/fav state
This commit is contained in:
@@ -486,7 +486,7 @@ class VideoIntroController extends GetxController {
|
||||
}
|
||||
|
||||
// 修改分P或番剧分集
|
||||
Future changeSeasonOrbangu(bvid, cid, aid, cover) async {
|
||||
Future changeSeasonOrbangu(epid, bvid, cid, aid, cover) async {
|
||||
// 重新获取视频资源
|
||||
final VideoDetailController videoDetailCtr =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
@@ -581,7 +581,7 @@ class VideoIntroController extends GetxController {
|
||||
final int cid = episodes[prevIndex].cid!;
|
||||
final String rBvid = isPages ? bvid : episodes[prevIndex].bvid;
|
||||
final int rAid = isPages ? IdUtils.bv2av(bvid) : episodes[prevIndex].aid!;
|
||||
changeSeasonOrbangu(rBvid, cid, rAid, null);
|
||||
changeSeasonOrbangu(null, rBvid, cid, rAid, null);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ class VideoIntroController extends GetxController {
|
||||
final int cid = episodes[nextIndex].cid!;
|
||||
final String rBvid = isPages ? bvid : episodes[nextIndex].bvid;
|
||||
final int rAid = isPages ? IdUtils.bv2av(bvid) : episodes[nextIndex].aid!;
|
||||
changeSeasonOrbangu(rBvid, cid, rAid, null);
|
||||
changeSeasonOrbangu(null, rBvid, cid, rAid, null);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ class ActionItem extends StatefulWidget {
|
||||
|
||||
class ActionItemState extends State<ActionItem>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late AnimationController? controller;
|
||||
late Animation<double>? _animation;
|
||||
AnimationController? controller;
|
||||
Animation<double>? _animation;
|
||||
|
||||
bool get _isThumbUp => widget.semanticsLabel == '点赞';
|
||||
late int _lastTime;
|
||||
|
||||
@@ -126,6 +126,7 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
child: InkWell(
|
||||
onTap: () => {
|
||||
widget.changeFuc(
|
||||
null,
|
||||
widget.bvid,
|
||||
widget.pages[i].cid,
|
||||
IdUtils.bv2av(widget.bvid),
|
||||
|
||||
@@ -104,25 +104,27 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
videoPlayerServiceHandler.onVideoDetailChange(
|
||||
value, videoDetailController.cid.value);
|
||||
});
|
||||
bangumiIntroController = Get.put(BangumiIntroController(), tag: heroTag);
|
||||
bangumiIntroController.loadingState.listen((value) {
|
||||
if (!context.mounted) return;
|
||||
if (value is Success) {
|
||||
videoPlayerServiceHandler.onVideoDetailChange(
|
||||
value.response,
|
||||
videoDetailController.cid.value,
|
||||
);
|
||||
}
|
||||
});
|
||||
videoDetailController.cid.listen((p0) {
|
||||
if (!context.mounted) return;
|
||||
if (bangumiIntroController.loadingState.value is Success) {
|
||||
videoPlayerServiceHandler.onVideoDetailChange(
|
||||
(bangumiIntroController.loadingState.value as Success).response,
|
||||
p0,
|
||||
);
|
||||
}
|
||||
});
|
||||
if (videoDetailController.videoType == SearchType.media_bangumi) {
|
||||
bangumiIntroController = Get.put(BangumiIntroController(), tag: heroTag);
|
||||
bangumiIntroController.loadingState.listen((value) {
|
||||
if (!context.mounted) return;
|
||||
if (value is Success) {
|
||||
videoPlayerServiceHandler.onVideoDetailChange(
|
||||
value.response,
|
||||
videoDetailController.cid.value,
|
||||
);
|
||||
}
|
||||
});
|
||||
videoDetailController.cid.listen((p0) {
|
||||
if (!context.mounted) return;
|
||||
if (bangumiIntroController.loadingState.value is Success) {
|
||||
videoPlayerServiceHandler.onVideoDetailChange(
|
||||
(bangumiIntroController.loadingState.value as Success).response,
|
||||
p0,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
autoExitFullscreen =
|
||||
setting.get(SettingBoxKey.enableAutoExit, defaultValue: true);
|
||||
horizontalScreen =
|
||||
@@ -200,8 +202,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
plPlayerController!.playRepeat != PlayRepeat.singleCycle) {
|
||||
if (videoDetailController.videoType == SearchType.video) {
|
||||
notExitFlag = videoIntroController.nextPlay();
|
||||
}
|
||||
if (videoDetailController.videoType == SearchType.media_bangumi) {
|
||||
} else if (videoDetailController.videoType ==
|
||||
SearchType.media_bangumi) {
|
||||
notExitFlag = bangumiIntroController.nextPlay();
|
||||
}
|
||||
}
|
||||
@@ -1317,7 +1319,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
bvid: bvid,
|
||||
aid: aid,
|
||||
currentCid: cid,
|
||||
changeFucCall: videoIntroController.changeSeasonOrbangu,
|
||||
changeFucCall: videoDetailController.videoType == SearchType.media_bangumi
|
||||
? bangumiIntroController.changeSeasonOrbangu
|
||||
: videoIntroController.changeSeasonOrbangu,
|
||||
context: context,
|
||||
scaffoldState: isFullScreen
|
||||
? videoDetailController.scaffoldKey.currentState
|
||||
|
||||
Reference in New Issue
Block a user