From 82caba56de1607f013845e770acda9e01ab7a12c Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Mon, 14 Oct 2024 13:40:35 +0800 Subject: [PATCH] opt: reply item --- .../detail/reply/widgets/reply_item_grpc.dart | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart index dcca44dfe..74ed39da3 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart @@ -295,13 +295,6 @@ class ReplyItemGrpc extends StatelessWidget { textPainter, didExceedMaxLines, ), - if (didExceedMaxLines) - TextSpan( - text: '\n查看更多', - style: TextStyle( - color: Theme.of(context).colorScheme.primary, - ), - ), ], ), ), @@ -940,6 +933,18 @@ InlineSpan buildContent( } } } + + if (didExceedMaxLines == true) { + spanChildren.add( + TextSpan( + text: '\n查看更多', + style: TextStyle( + color: Theme.of(context).colorScheme.primary, + ), + ), + ); + } + // 图片渲染 if (content.pictures.isNotEmpty) { spanChildren.add(const TextSpan(text: '\n'));