TF-2182 Fix no blue bar for calendar events
(cherry picked from commit 7ea91d59e860dbd8f5bd38cefd76ca61bc4cc4e3)
This commit is contained in:
@@ -9,6 +9,9 @@ import 'package:uri/uri.dart';
|
||||
|
||||
class Attachment with EquatableMixin {
|
||||
|
||||
static const String eventICSSubtype = 'ics';
|
||||
static const String eventCalendarSubtype = 'calendar';
|
||||
|
||||
final PartId? partId;
|
||||
final Id? blobId;
|
||||
final UnsignedInt? size;
|
||||
@@ -50,8 +53,6 @@ class Attachment with EquatableMixin {
|
||||
}
|
||||
}
|
||||
|
||||
bool get isCalendarEvent => type?.subtype == 'ics' || type?.subtype == 'calendar';
|
||||
|
||||
@override
|
||||
List<Object?> get props => [partId, blobId, size, name, type, cid, disposition];
|
||||
}
|
||||
|
||||
@@ -119,22 +119,9 @@ extension EmailExtension on Email {
|
||||
return emailContents ?? [];
|
||||
}
|
||||
|
||||
List<Attachment> get allAttachments {
|
||||
if (attachments != null) {
|
||||
return attachments!
|
||||
.where((element) => element.disposition != null)
|
||||
.map((item) => item.toAttachment())
|
||||
.toList();
|
||||
}
|
||||
return [];
|
||||
}
|
||||
List<Attachment> get allAttachments => attachments?.map((item) => item.toAttachment()).toList() ?? [];
|
||||
|
||||
List<Attachment> get attachmentsWithCid {
|
||||
return attachments
|
||||
?.where((element) => element.disposition != null && element.cid?.isNotEmpty == true)
|
||||
.map((item) => item.toAttachment())
|
||||
.toList() ?? [];
|
||||
}
|
||||
List<Attachment> get attachmentsWithCid => allAttachments.where((attachment) => attachment.hasCid()).toList();
|
||||
|
||||
PresentationMailbox? findMailboxContain(Map<MailboxId, PresentationMailbox> mapMailbox) {
|
||||
final newMailboxIds = mailboxIds;
|
||||
|
||||
@@ -13,15 +13,9 @@ extension ListAttachmentExtension on List<Attachment> {
|
||||
return 0;
|
||||
}
|
||||
|
||||
List<Attachment> get listAttachmentsDisplayedOutSide {
|
||||
return where((attachment) => attachment.disposition == ContentDisposition.attachment || attachment.noCid())
|
||||
.toList();
|
||||
}
|
||||
List<Attachment> get listAttachmentsDisplayedOutSide => where((attachment) => attachment.noCid()).toList();
|
||||
|
||||
List<Attachment> get listAttachmentsDisplayedInContent {
|
||||
return where((attachment) => attachment.hasCid())
|
||||
.toList();
|
||||
}
|
||||
List<Attachment> get listAttachmentsDisplayedInContent => where((attachment) => attachment.hasCid()).toList();
|
||||
|
||||
Map<String, String> toMapCidImageDownloadUrl({
|
||||
required AccountId accountId,
|
||||
|
||||
+1
-1
@@ -484,7 +484,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: d374ca15dc5395a6e81cd7714c17a436439f4732
|
||||
resolved-ref: e8005e28b48ee06259d4f51045a58f20c891e0b9
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
|
||||
Reference in New Issue
Block a user