TF-2345 Fixe attachments are not displayed when cid is present
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit d4a95bfa305b198f5d3c369e3f49decb495b6fba)
This commit is contained in:
@@ -34,6 +34,8 @@ class Attachment with EquatableMixin {
|
||||
|
||||
bool hasCid() => cid != null && cid?.isNotEmpty == true;
|
||||
|
||||
bool isInlined() => disposition == ContentDisposition.inline;
|
||||
|
||||
String getDownloadUrl(String baseDownloadUrl, AccountId accountId) {
|
||||
final downloadUriTemplate = UriTemplate(baseDownloadUrl);
|
||||
final downloadUri = downloadUriTemplate.expand({
|
||||
|
||||
@@ -13,7 +13,7 @@ extension ListAttachmentExtension on List<Attachment> {
|
||||
return 0;
|
||||
}
|
||||
|
||||
List<Attachment> get listAttachmentsDisplayedOutSide => where((attachment) => attachment.noCid()).toList();
|
||||
List<Attachment> get listAttachmentsDisplayedOutSide => where((attachment) => attachment.noCid() || !attachment.isInlined()).toList();
|
||||
|
||||
List<Attachment> get listAttachmentsDisplayedInContent => where((attachment) => attachment.hasCid()).toList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user