TF-2764 Enable preview PDF attachment on web platform

This commit is contained in:
dab246
2024-05-15 09:51:50 +07:00
committed by Dat H. Pham
parent b3d95841a8
commit 8d8728ec97
9 changed files with 30 additions and 38 deletions
@@ -343,20 +343,8 @@ class EmailView extends GetWidget<SingleEmailController> {
onDragEnd: (details) {
controller.mailboxDashBoardController.disableDraggableApp();
},
downloadAttachmentAction: (attachment) {
if (PlatformInfo.isWeb) {
controller.downloadAttachmentForWeb(attachment);
} else {
controller.exportAttachment(context, attachment);
}
},
// viewAttachmentAction: (attachment) {
// if (PlatformInfo.isWeb) {
// controller.viewAttachmentForWeb(attachment);
// } else {
// controller.exportAttachment(context, attachment);
// }
// },
downloadAttachmentAction: (attachment) => controller.handleDownloadAttachmentAction(context, attachment),
viewAttachmentAction: (attachment) => controller.handleViewAttachmentAction(context, attachment),
onTapShowAllAttachmentFile: () => controller.openAttachmentList(context, controller.attachments),
);
} else {