🐛 Fix dupe attachment notification
This commit is contained in:
parent
0b2309816f
commit
94385564bd
@ -23,16 +23,19 @@ class ChatEventMessage extends StatelessWidget {
|
|||||||
final body = EventMessageBody.fromJson(item.body);
|
final body = EventMessageBody.fromJson(item.body);
|
||||||
final hasAttachment = body.attachments?.isNotEmpty ?? false;
|
final hasAttachment = body.attachments?.isNotEmpty ?? false;
|
||||||
|
|
||||||
if (body.text.isEmpty && hasAttachment) {
|
if (body.text.isEmpty &&
|
||||||
|
hasAttachment &&
|
||||||
|
!isContentPreviewing &&
|
||||||
|
!isQuote) {
|
||||||
final unFocusColor =
|
final unFocusColor =
|
||||||
Theme.of(context).colorScheme.onSurface.withOpacity(0.75);
|
Theme.of(context).colorScheme.onSurface.withOpacity(0.75);
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.attachment,
|
Icons.file_copy,
|
||||||
size: 18,
|
size: 15,
|
||||||
color: unFocusColor,
|
color: unFocusColor,
|
||||||
).paddingOnly(right: 6),
|
).paddingOnly(right: 5),
|
||||||
Text(
|
Text(
|
||||||
'attachmentHint'.trParams(
|
'attachmentHint'.trParams(
|
||||||
{'count': body.attachments?.length.toString() ?? 0.toString()},
|
{'count': body.attachments?.length.toString() ?? 0.toString()},
|
||||||
|
Loading…
Reference in New Issue
Block a user