mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 子评论条数知情权
当replies为空,而replyControl.entryText却有类似【共1条回复】的情况下,说明子评论区被折叠,虽然不能直接看到内容,但可以显示条数
This commit is contained in:
@@ -287,7 +287,8 @@ class ReplyItem extends StatelessWidget {
|
|||||||
buttonAction(context, replyItem!.replyControl),
|
buttonAction(context, replyItem!.replyControl),
|
||||||
// 一楼的评论
|
// 一楼的评论
|
||||||
if ((replyItem!.replyControl!.isShow! ||
|
if ((replyItem!.replyControl!.isShow! ||
|
||||||
replyItem!.replies!.isNotEmpty) &&
|
replyItem!.replies!.isNotEmpty ||
|
||||||
|
replyItem!.replyControl!.entryText != null) &&
|
||||||
showReplyRow!) ...[
|
showReplyRow!) ...[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 5, bottom: 12),
|
padding: const EdgeInsets.only(top: 5, bottom: 12),
|
||||||
@@ -448,8 +449,10 @@ class ReplyItemRow extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final bool isShow = replyControl!.isShow!;
|
final int extraRow = replyControl?.isShow == true ||
|
||||||
final int extraRow = replyControl != null && isShow ? 1 : 0;
|
(replyControl?.entryText != null && replies!.isEmpty)
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(left: 42, right: 4, top: 0),
|
margin: const EdgeInsets.only(left: 42, right: 4, top: 0),
|
||||||
child: Material(
|
child: Material(
|
||||||
|
|||||||
Reference in New Issue
Block a user