diff --git a/lib/pages/comic_details_page/comments_page.dart b/lib/pages/comic_details_page/comments_page.dart index de2589b..0240c46 100644 --- a/lib/pages/comic_details_page/comments_page.dart +++ b/lib/pages/comic_details_page/comments_page.dart @@ -651,10 +651,16 @@ class _CommentImage { } class RichCommentContent extends StatefulWidget { - const RichCommentContent({super.key, required this.text}); + const RichCommentContent({ + super.key, + required this.text, + this.showImages = true, + }); final String text; + final bool showImages; + @override State createState() => _RichCommentContentState(); } @@ -808,7 +814,7 @@ class _RichCommentContentState extends State { children: textSpan, ), ); - if (images.isNotEmpty) { + if (images.isNotEmpty && widget.showImages) { content = Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/pages/comic_details_page/comments_preview.dart b/lib/pages/comic_details_page/comments_preview.dart index b0b4c43..f6fc60e 100644 --- a/lib/pages/comic_details_page/comments_preview.dart +++ b/lib/pages/comic_details_page/comments_preview.dart @@ -138,7 +138,10 @@ class _CommentWidget extends StatelessWidget { ), const SizedBox(height: 4), Expanded( - child: RichCommentContent(text: comment.content).fixWidth(324), + child: RichCommentContent( + text: comment.content, + showImages: false, + ).fixWidth(324), ), const SizedBox(height: 4), if (comment.time != null) @@ -147,4 +150,4 @@ class _CommentWidget extends StatelessWidget { ), ); } -} \ No newline at end of file +}