🐛 Fix inline attachment didn't render properly

This commit is contained in:
2025-09-08 22:43:41 +08:00
parent 1069669049
commit c4d5ba5c9d
2 changed files with 8 additions and 1 deletions

View File

@@ -436,6 +436,7 @@ class PostItem extends HookConsumerWidget {
MarkdownTextContent( MarkdownTextContent(
content: translatedText.value!, content: translatedText.value!,
isSelectable: isTextSelectable, isSelectable: isTextSelectable,
attachments: item.attachments,
), ),
], ],
) )

View File

@@ -141,6 +141,7 @@ class PostReplyPreview extends HookConsumerWidget {
Expanded( Expanded(
child: MarkdownTextContent( child: MarkdownTextContent(
content: post.content!, content: post.content!,
attachments: post.attachments,
).padding(top: 2), ).padding(top: 2),
) )
else else
@@ -210,6 +211,7 @@ class PostReplyPreview extends HookConsumerWidget {
Expanded( Expanded(
child: MarkdownTextContent( child: MarkdownTextContent(
content: data.value!.content!, content: data.value!.content!,
attachments: data.value!.attachments,
), ),
) )
else else
@@ -745,7 +747,10 @@ class PostBody extends ConsumerWidget {
style: Theme.of(context).textTheme.bodyMedium, style: Theme.of(context).textTheme.bodyMedium,
) )
else else
MarkdownTextContent(content: '${item.content!}...'), MarkdownTextContent(
content: '${item.content!}...',
attachments: item.attachments,
),
], ],
), ),
) )
@@ -784,6 +789,7 @@ class PostBody extends ConsumerWidget {
? '${item.content!}...' ? '${item.content!}...'
: item.content ?? '', : item.content ?? '',
isSelectable: isTextSelectable, isSelectable: isTextSelectable,
attachments: item.attachments,
), ),
if (translationSection != null) translationSection!, if (translationSection != null) translationSection!,
], ],