From c4d5ba5c9d794c14f9cc8048a68334c1c21c6a40 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 8 Sep 2025 22:43:41 +0800 Subject: [PATCH] :bug: Fix inline attachment didn't render properly --- lib/widgets/post/post_item.dart | 1 + lib/widgets/post/post_shared.dart | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/widgets/post/post_item.dart b/lib/widgets/post/post_item.dart index f64b1b81..2d6e8cb1 100644 --- a/lib/widgets/post/post_item.dart +++ b/lib/widgets/post/post_item.dart @@ -436,6 +436,7 @@ class PostItem extends HookConsumerWidget { MarkdownTextContent( content: translatedText.value!, isSelectable: isTextSelectable, + attachments: item.attachments, ), ], ) diff --git a/lib/widgets/post/post_shared.dart b/lib/widgets/post/post_shared.dart index 856db642..729702db 100644 --- a/lib/widgets/post/post_shared.dart +++ b/lib/widgets/post/post_shared.dart @@ -141,6 +141,7 @@ class PostReplyPreview extends HookConsumerWidget { Expanded( child: MarkdownTextContent( content: post.content!, + attachments: post.attachments, ).padding(top: 2), ) else @@ -210,6 +211,7 @@ class PostReplyPreview extends HookConsumerWidget { Expanded( child: MarkdownTextContent( content: data.value!.content!, + attachments: data.value!.attachments, ), ) else @@ -745,7 +747,10 @@ class PostBody extends ConsumerWidget { style: Theme.of(context).textTheme.bodyMedium, ) else - MarkdownTextContent(content: '${item.content!}...'), + MarkdownTextContent( + content: '${item.content!}...', + attachments: item.attachments, + ), ], ), ) @@ -784,6 +789,7 @@ class PostBody extends ConsumerWidget { ? '${item.content!}...' : item.content ?? '', isSelectable: isTextSelectable, + attachments: item.attachments, ), if (translationSection != null) translationSection!, ],