From f4a3c43fb6d9d03f1651fb90e39af758f583e881 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 8 Sep 2024 19:13:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AD=90=E8=AF=84=E8=AE=BA=E6=9D=A1?= =?UTF-8?q?=E6=95=B0=E7=9F=A5=E6=83=85=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当replies为空,而replyControl.entryText却有类似【共1条回复】的情况下,说明子评论区被折叠,虽然不能直接看到内容,但可以显示条数 --- lib/pages/video/detail/reply/widgets/reply_item.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index 94861d40..0ebd261d 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -287,7 +287,8 @@ class ReplyItem extends StatelessWidget { buttonAction(context, replyItem!.replyControl), // 一楼的评论 if ((replyItem!.replyControl!.isShow! || - replyItem!.replies!.isNotEmpty) && + replyItem!.replies!.isNotEmpty || + replyItem!.replyControl!.entryText != null) && showReplyRow!) ...[ Padding( padding: const EdgeInsets.only(top: 5, bottom: 12), @@ -448,8 +449,10 @@ class ReplyItemRow extends StatelessWidget { @override Widget build(BuildContext context) { - final bool isShow = replyControl!.isShow!; - final int extraRow = replyControl != null && isShow ? 1 : 0; + final int extraRow = replyControl?.isShow == true || + (replyControl?.entryText != null && replies!.isEmpty) + ? 1 + : 0; return Container( margin: const EdgeInsets.only(left: 42, right: 4, top: 0), child: Material(