From 71d59a08a0222ff269f8d8350c0b0e4a3bc2e9ad Mon Sep 17 00:00:00 2001 From: ykyivskyi-gd Date: Mon, 27 Sep 2021 22:09:50 +0300 Subject: [PATCH] Fixed attachment size checking on Compose view; --- FlowCrypt/Controllers/Compose/ComposeViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/Compose/ComposeViewController.swift b/FlowCrypt/Controllers/Compose/ComposeViewController.swift index 02512c0f2..e6f0913e8 100644 --- a/FlowCrypt/Controllers/Compose/ComposeViewController.swift +++ b/FlowCrypt/Controllers/Compose/ComposeViewController.swift @@ -686,7 +686,7 @@ extension ComposeViewController: UIImagePickerControllerDelegate, UINavigationCo } private func appendAttachmentIfAllowed(_ attachment: ComposeMessageAttachment) { - let totalSize = contextToSend.attachments.reduce(0, { $0 + $1.size }) + let totalSize = contextToSend.attachments.reduce(0, { $0 + $1.size }) + attachment.size if totalSize > GeneralConstants.Global.attachmentSizeLimit { showToast("files_picking_size_error_message".localized) } else {