From b55e102dc36b2c707db61985689b30326c98b50c Mon Sep 17 00:00:00 2001 From: barmxds6ch <1773127066@qq.com> Date: Fri, 27 Feb 2026 10:56:44 +0800 Subject: [PATCH] feat(whisper): add uploader message attachment display (#1849) * feat(whisper): add uploader message attachment display * update --------- Co-authored-by: dom --- .../whisper_detail/widget/chat_item.dart | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/pages/whisper_detail/widget/chat_item.dart b/lib/pages/whisper_detail/widget/chat_item.dart index e47db1603..5930c9769 100644 --- a/lib/pages/whisper_detail/widget/chat_item.dart +++ b/lib/pages/whisper_detail/widget/chat_item.dart @@ -397,6 +397,11 @@ class ChatItem extends StatelessWidget { } Widget msgTypeVideoCard_11(ThemeData theme, content, Color textColor) { + String? attachMsg; + try { + attachMsg = content['attach_msg']?['content']; + } catch (_) {} + return Center( child: Container( clipBehavior: Clip.hardEdge, @@ -428,7 +433,7 @@ class ChatItem extends StatelessWidget { } }, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Stack( clipBehavior: Clip.none, @@ -465,6 +470,20 @@ class ChatItem extends StatelessWidget { ), ), ), + if (attachMsg?.isNotEmpty ?? false) + Container( + margin: const .fromLTRB(12, 0, 12, 8), + padding: const .symmetric(horizontal: 11, vertical: 3.5), + decoration: BoxDecoration( + color: theme.colorScheme.surface, + borderRadius: const .all(.circular(6)), + ), + child: msgTypeText_1( + theme, + content: content['attach_msg'], + textColor: textColor, + ), + ), ], ), );