From 94385564bd0a29ad20bfb0e410be7f4c24e91cf4 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 7 Aug 2024 14:27:23 +0800 Subject: [PATCH] :bug: Fix dupe attachment notification --- lib/widgets/chat/chat_event_message.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/widgets/chat/chat_event_message.dart b/lib/widgets/chat/chat_event_message.dart index 1fb0097..644e62f 100644 --- a/lib/widgets/chat/chat_event_message.dart +++ b/lib/widgets/chat/chat_event_message.dart @@ -23,16 +23,19 @@ class ChatEventMessage extends StatelessWidget { final body = EventMessageBody.fromJson(item.body); final hasAttachment = body.attachments?.isNotEmpty ?? false; - if (body.text.isEmpty && hasAttachment) { + if (body.text.isEmpty && + hasAttachment && + !isContentPreviewing && + !isQuote) { final unFocusColor = Theme.of(context).colorScheme.onSurface.withOpacity(0.75); return Row( children: [ Icon( - Icons.attachment, - size: 18, + Icons.file_copy, + size: 15, color: unFocusColor, - ).paddingOnly(right: 6), + ).paddingOnly(right: 5), Text( 'attachmentHint'.trParams( {'count': body.attachments?.length.toString() ?? 0.toString()},