feat: 子评论条数知情权

当replies为空,而replyControl.entryText却有类似【共1条回复】的情况下,说明子评论区被折叠,虽然不能直接看到内容,但可以显示条数
This commit is contained in:
orz12
2024-09-08 19:13:08 +08:00
committed by bggRGjQaUbCoE
parent 078d9033b1
commit f4a3c43fb6

View File

@@ -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(