TF-825 Download email as EML file (#2854)

This commit is contained in:
Dat Vu
2024-05-16 15:50:01 +07:00
committed by GitHub
parent 175f285e51
commit ca4cf68f87
29 changed files with 153 additions and 26 deletions
@@ -34,7 +34,8 @@ extension EmailCacheExtension on EmailCache {
: null,
headerCalendarEvent: headerCalendarEvent != null
? Map.fromIterables(headerCalendarEvent!.keys.map((value) => IndividualHeaderIdentifier(value)), headerCalendarEvent!.values)
: null
: null,
blobId: blobId != null ? Id(blobId!) : null,
);
}
@@ -25,6 +25,7 @@ extension EmailExtension on Email {
replyTo: replyTo?.map((emailAddress) => emailAddress.toEmailAddressHiveCache()).toList(),
mailboxIds: mailboxIds?.toMapString(),
headerCalendarEvent: headerCalendarEvent?.toMapString(),
blobId: blobId?.value,
);
}
@@ -54,6 +54,9 @@ class EmailCache extends HiveObject with EquatableMixin {
@HiveField(14)
Map<String, String?>? headerCalendarEvent;
@HiveField(15)
final String? blobId;
EmailCache(
this.id,
{
@@ -71,6 +74,7 @@ class EmailCache extends HiveObject with EquatableMixin {
this.replyTo,
this.mailboxIds,
this.headerCalendarEvent,
this.blobId,
}
);
@@ -91,5 +95,6 @@ class EmailCache extends HiveObject with EquatableMixin {
hasAttachment,
mailboxIds,
headerCalendarEvent,
blobId,
];
}