TF-1961 Transform html email content in composer
(cherry picked from commit f5470c130744242195b265a0ea4aad044ad8e740)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user