TF-389 Fix can not see the attachment in EmailView
This commit is contained in:
@@ -27,7 +27,9 @@ class Attachment with EquatableMixin {
|
||||
this.disposition,
|
||||
});
|
||||
|
||||
bool cidNotEmpty() => cid != null && cid!.isNotEmpty;
|
||||
bool noCid() => cid == null || cid?.isEmpty == true;
|
||||
|
||||
bool hasCid() => cid != null && cid?.isNotEmpty == true;
|
||||
|
||||
String getDownloadUrl(String baseDownloadUrl, AccountId accountId) {
|
||||
final downloadUriTemplate = UriTemplate('$baseDownloadUrl');
|
||||
|
||||
@@ -12,12 +12,13 @@ extension ListAttachmentExtension on List<Attachment> {
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
List<Attachment> get attachmentsWithDispositionAttachment {
|
||||
return where((attachment) => attachment.disposition == ContentDisposition.attachment).toList();
|
||||
List<Attachment> get listAttachmentsDisplayedOutSide {
|
||||
return where((attachment) => attachment.disposition == ContentDisposition.attachment || attachment.noCid())
|
||||
.toList();
|
||||
}
|
||||
|
||||
List<Attachment> get attachmentWithDispositionInlines {
|
||||
return where((attachment) => attachment.disposition == ContentDisposition.inline && attachment.cidNotEmpty())
|
||||
List<Attachment> get listAttachmentsDisplayedInContent {
|
||||
return where((attachment) => attachment.hasCid())
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user