From d4d77b926a7d18abb5fbf250c06292487f7f87ae Mon Sep 17 00:00:00 2001 From: Magellan Date: Mon, 8 Dec 2025 23:32:43 +0200 Subject: [PATCH] fix reply bubble --- .../features/conversation/widgets/reply_bubble.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sama_chat_client/lib/src/features/conversation/widgets/reply_bubble.dart b/sama_chat_client/lib/src/features/conversation/widgets/reply_bubble.dart index a9dc6e6b..49bb579e 100644 --- a/sama_chat_client/lib/src/features/conversation/widgets/reply_bubble.dart +++ b/sama_chat_client/lib/src/features/conversation/widgets/reply_bubble.dart @@ -110,11 +110,15 @@ class ReplyBubble extends StatelessWidget { var isImageType = isImage(attachment.fileName, attachment.contentType); return FutureBuilder( - future: isImageType - ? Future.value(attachment.url ?? '') - : getVideoThumbnailByUrl(attachment.url!, attachment.fileId), + future: attachment.url == null + ? Future.value('') + : isImageType + ? Future.value(attachment.url!) + : getVideoThumbnailByUrl(attachment.url!, attachment.fileId), builder: (context, snapshot) { - if (snapshot.hasError || !snapshot.hasData) { + if (snapshot.hasError || + !snapshot.hasData || + snapshot.data!.isEmpty) { return const SizedBox(height: 40, width: 40); } return Container(