From 850a09a28172cf75e7ca03b012a85c2def953ca3 Mon Sep 17 00:00:00 2001 From: dab246 Date: Wed, 3 Sep 2025 14:29:02 +0700 Subject: [PATCH] TF-4000 Display all attachments in email detailed view --- .../presentation/widgets/email_attachments_widget.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/features/email/presentation/widgets/email_attachments_widget.dart b/lib/features/email/presentation/widgets/email_attachments_widget.dart index c04ce7143..06f8952dc 100644 --- a/lib/features/email/presentation/widgets/email_attachments_widget.dart +++ b/lib/features/email/presentation/widgets/email_attachments_widget.dart @@ -26,6 +26,7 @@ class EmailAttachmentsWidget extends StatelessWidget { final ImagePaths imagePaths; final OnTapActionCallback? onTapShowAllAttachmentFile; final bool showDownloadAllAttachmentsButton; + final bool isDisplayAllAttachments; final OnTapActionCallback? onTapDownloadAllButton; final String? singleEmailControllerTag; @@ -40,6 +41,7 @@ class EmailAttachmentsWidget extends StatelessWidget { this.viewAttachmentAction, this.onTapShowAllAttachmentFile, this.showDownloadAllAttachmentsButton = false, + this.isDisplayAllAttachments = true, this.onTapDownloadAllButton, this.singleEmailControllerTag, }); @@ -230,6 +232,7 @@ class EmailAttachmentsWidget extends StatelessWidget { ), child: Wrap( spacing: 8, + runSpacing: isDisplayAllAttachments ? 8 : 0, crossAxisAlignment: WrapCrossAlignment.center, children: [ ...displayedAttachments.map((attachment) { @@ -282,6 +285,10 @@ class EmailAttachmentsWidget extends StatelessWidget { ({List displayedAttachments, int hiddenItemsCount}) _getDisplayedAndHiddenAttachment(BuildContext context, double maxWidth) { + if (isDisplayAllAttachments) { + return (displayedAttachments: attachments, hiddenItemsCount: 0); + } + final displayedAttachments = EmailUtils.getAttachmentDisplayed( maxWidth: maxWidth, attachments: attachments,