feat: custom show reply

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-23 18:32:02 +08:00
parent a8d40b4aea
commit 385ebd01cc
6 changed files with 136 additions and 81 deletions

View File

@@ -549,6 +549,7 @@ class VideoIntroController extends GetxController
}
videoDetailCtr.danmakuCid.value = cid;
videoDetailCtr.queryVideoUrl();
// 重新请求相关视频
if (videoDetailCtr.showRelatedVideo) {
try {
@@ -557,13 +558,16 @@ class VideoIntroController extends GetxController
..queryData();
} catch (_) {}
}
// 重新请求评论
try {
final VideoReplyController videoReplyCtr =
Get.find<VideoReplyController>(tag: heroTag);
videoReplyCtr.aid = aid;
videoReplyCtr.onRefresh();
} catch (_) {}
if (videoDetailCtr.showReply) {
try {
Get.find<VideoReplyController>(tag: heroTag)
..aid = aid
..onRefresh();
} catch (_) {}
}
this.bvid = bvid;
lastPlayCid.value = cid;
queryVideoIntro();

View File

@@ -542,7 +542,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
'${videoIntroController.videoDetail.value.bvid}');
},
child: Text(
'${videoIntroController.videoDetail.value.bvid}',
videoIntroController.videoDetail.value.bvid ?? '',
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.primary,