TF-2644 Display warning dialog when drag & drop file exceeded maximum size in composer
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -1978,20 +1978,10 @@ class ComposerController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _addAttachmentFromDragAndDrop({required FileInfo fileInfo}) {
|
void _addAttachmentFromDragAndDrop({required FileInfo fileInfo}) {
|
||||||
if (!uploadController.isExceededMaxSizeAttachmentsPerEmail(totalSizePreparedFiles: fileInfo.fileSize)) {
|
uploadController.validateTotalSizeAttachmentsBeforeUpload(
|
||||||
_uploadAttachmentsAction([fileInfo]);
|
listFileInfo: [fileInfo],
|
||||||
} else {
|
callbackAction: () => _uploadAttachmentsAction([fileInfo])
|
||||||
if (currentContext != null) {
|
);
|
||||||
showConfirmDialogAction(
|
|
||||||
currentContext!,
|
|
||||||
AppLocalizations.of(currentContext!).message_dialog_upload_attachments_exceeds_maximum_size(
|
|
||||||
filesize(mailboxDashBoardController.maxSizeAttachmentsPerEmail?.value ?? 0, 0)),
|
|
||||||
AppLocalizations.of(currentContext!).got_it,
|
|
||||||
title: AppLocalizations.of(currentContext!).maximum_files_size,
|
|
||||||
hasCancelButton: false,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FocusNode? getNextFocusOfToEmailAddress() {
|
FocusNode? getNextFocusOfToEmailAddress() {
|
||||||
|
|||||||
Reference in New Issue
Block a user