Merge branch 'fix' into alpha

This commit is contained in:
guozhigq
2023-09-17 22:58:25 +08:00

View File

@ -39,6 +39,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
Future? _futureBuilderFuture;
bool _isFabVisible = true;
String replyLevel = '1';
late String heroTag;
// 添加页面缓存
@override
@ -46,16 +47,17 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
@override
void initState() {
int oid = widget.bvid != null ? IdUtils.bv2av(widget.bvid!) : 0;
super.initState();
int oid = widget.bvid != null ? IdUtils.bv2av(widget.bvid!) : 0;
heroTag = Get.arguments['heroTag'];
replyLevel = widget.replyLevel ?? '1';
if (replyLevel == '2') {
_videoReplyController = Get.put(
VideoReplyController(oid, widget.rpid.toString(), replyLevel),
tag: widget.rpid.toString());
} else {
_videoReplyController = Get.put(VideoReplyController(oid, '', replyLevel),
tag: Get.arguments['heroTag']);
_videoReplyController =
Get.put(VideoReplyController(oid, '', replyLevel), tag: heroTag);
}
fabAnimationCtr = AnimationController(
@ -106,7 +108,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
// 展示二级回复
void replyReply(replyItem) {
VideoDetailController videoDetailCtr =
Get.find<VideoDetailController>(tag: Get.arguments['heroTag']);
Get.find<VideoDetailController>(tag: heroTag);
if (replyItem != null) {
videoDetailCtr.oid = replyItem.oid;
videoDetailCtr.fRpid = replyItem.rpid!;