TF-1961 Transform html email content in composer

(cherry picked from commit f5470c130744242195b265a0ea4aad044ad8e740)
This commit is contained in:
dab246
2023-08-18 19:42:04 +07:00
committed by Dat Vu
parent e06d35f1e1
commit 8eed49fd73
45 changed files with 1139 additions and 644 deletions
@@ -1,4 +1,6 @@
import 'package:model/model.dart';
import 'package:jmap_dart_client/jmap/account_id.dart';
import 'package:model/email/attachment.dart';
extension ListAttachmentExtension on List<Attachment> {
@@ -20,4 +22,15 @@ extension ListAttachmentExtension on List<Attachment> {
return where((attachment) => attachment.hasCid())
.toList();
}
Map<String, String> toMapCidImageDownloadUrl({
required AccountId accountId,
required String downloadUrl
}) {
final mapUrlDownloadCID = {
for (var attachment in listAttachmentsDisplayedInContent)
attachment.cid! : attachment.getDownloadUrl(downloadUrl, accountId)
};
return mapUrlDownloadCID;
}
}