From 9d5c452eae0dc091603165bdadbd7e623e6ee426 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 23 Sep 2024 23:20:01 +0800 Subject: [PATCH] :bug: Fix overflow in content --- lib/widgets/posts/post_item.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/widgets/posts/post_item.dart b/lib/widgets/posts/post_item.dart index e1fecd5..bea3fe9 100644 --- a/lib/widgets/posts/post_item.dart +++ b/lib/widgets/posts/post_item.dart @@ -209,14 +209,17 @@ class _PostItemState extends State { onChange: (size) { setState(() => _contentHeight = size.height); }, - child: MarkdownTextContent( - parentId: 'p${item.id}-embed', - content: item.body['content'], - isAutoWarp: item.type == 'story', - isSelectable: widget.isContentSelectable, - isLargeText: item.type == 'article' && - widget.isFullContent, - ).paddingOnly(left: 12, right: 8), + child: SingleChildScrollView( + physics: const NeverScrollableScrollPhysics(), + child: MarkdownTextContent( + parentId: 'p${item.id}-embed', + content: item.body['content'], + isAutoWarp: item.type == 'story', + isSelectable: widget.isContentSelectable, + isLargeText: item.type == 'article' && + widget.isFullContent, + ).paddingOnly(left: 12, right: 8), + ), ), ), if (_contentHeight >= 320 && !widget.isFullContent)