Change order of attachment and mail body on mobile

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-07-09 11:52:29 +07:00
committed by Dat H. Pham
parent 5e3f4458c5
commit 296065c0b7
28 changed files with 501 additions and 418 deletions
+41 -22
View File
@@ -338,27 +338,6 @@ class EmailView extends GetWidget<SingleEmailController> {
presentationEmail: controller.currentEmail,
emailUnsubscribe: controller.emailUnsubscribe.value
)),
Obx(() {
if (controller.attachments.isNotEmpty) {
return EmailAttachmentsWidget(
responsiveUtils: controller.responsiveUtils,
attachments: controller.attachments,
imagePaths: controller.imagePaths,
onDragStarted: controller.mailboxDashBoardController.enableAttachmentDraggableApp,
onDragEnd: (details) {
controller.mailboxDashBoardController.disableAttachmentDraggableApp();
},
downloadAttachmentAction: (attachment) => controller.handleDownloadAttachmentAction(context, attachment),
viewAttachmentAction: (attachment) => controller.handleViewAttachmentAction(context, attachment),
onTapShowAllAttachmentFile: () => controller.openAttachmentList(context, controller.attachments),
showDownloadAllAttachmentsButton: controller.downloadAllButtonIsEnabled(),
onTapDownloadAllButton: () => controller.handleDownloadAllAttachmentsAction(context, 'TwakeMail-${DateTime.now()}'),
singleEmailControllerTag: tag,
);
} else {
return const SizedBox.shrink();
}
}),
Obx(() => EmailViewLoadingBarWidget(
viewState: controller.emailLoadedViewState.value
)),
@@ -524,7 +503,47 @@ class EmailView extends GetWidget<SingleEmailController> {
} else {
return const SizedBox.shrink();
}
})
}),
Obx(() {
if (controller.attachments.isNotEmpty) {
return EmailAttachmentsWidget(
responsiveUtils: controller.responsiveUtils,
attachments: controller.attachments,
imagePaths: controller.imagePaths,
onDragStarted: controller
.mailboxDashBoardController.enableAttachmentDraggableApp,
onDragEnd: (_) {
controller
.mailboxDashBoardController
.disableAttachmentDraggableApp();
},
downloadAttachmentAction: (attachment) =>
controller.handleDownloadAttachmentAction(
context,
attachment,
),
viewAttachmentAction: (attachment) =>
controller.handleViewAttachmentAction(
context,
attachment,
),
onTapShowAllAttachmentFile: () => controller.openAttachmentList(
context,
controller.attachments,
),
showDownloadAllAttachmentsButton:
controller.downloadAllButtonIsEnabled(),
onTapDownloadAllButton: () =>
controller.handleDownloadAllAttachmentsAction(
context,
'TwakeMail-${DateTime.now()}',
),
singleEmailControllerTag: tag,
);
} else {
return const SizedBox.shrink();
}
}),
],
);
}