TF-1608 Add references and inReplyTo fields to email offline
(cherry picked from commit 1f58a814a5003c3cbd1f3ba287de5bb54565d52f)
This commit is contained in:
@@ -15,7 +15,9 @@ extension DetailedEmailExtension on DetailedEmail {
|
||||
attachments: attachments?.toHiveCache(),
|
||||
headers: headers?.toList().toHiveCache(),
|
||||
keywords: keywords?.toMapString(),
|
||||
emailContentPath: emailContentPath
|
||||
emailContentPath: emailContentPath,
|
||||
messageId: messageId?.ids.toList(),
|
||||
references: references?.ids.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,6 +34,8 @@ extension DetailedEmailExtension on DetailedEmail {
|
||||
keywords: keywords,
|
||||
htmlEmailContent: htmlEmailContent,
|
||||
emailContentPath: path,
|
||||
messageId: messageId,
|
||||
references: references,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,12 @@ extension DetailedEmailHiveCacheExtension on DetailedEmailHiveCache {
|
||||
? Map.fromIterables(keywords!.keys.map((value) => KeyWordIdentifier(value)), keywords!.values)
|
||||
: null,
|
||||
htmlEmailContent: emailContent,
|
||||
messageId: messageId != null
|
||||
? MessageIdsHeaderValue(messageId!.toSet())
|
||||
: null,
|
||||
references: references != null
|
||||
? MessageIdsHeaderValue(references!.toSet())
|
||||
: null
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,9 @@ extension EmailExtension on Email {
|
||||
attachments: allAttachments,
|
||||
headers: headers,
|
||||
keywords: keywords,
|
||||
htmlEmailContent: htmlEmailContent
|
||||
htmlEmailContent: htmlEmailContent,
|
||||
messageId: messageId,
|
||||
references: references
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ class DetailedEmail with EquatableMixin {
|
||||
final String? htmlEmailContent;
|
||||
final String? emailContentPath;
|
||||
final DateTime createdTime;
|
||||
final MessageIdsHeaderValue? messageId;
|
||||
final MessageIdsHeaderValue? references;
|
||||
|
||||
DetailedEmail({
|
||||
required this.emailId,
|
||||
@@ -20,7 +22,9 @@ class DetailedEmail with EquatableMixin {
|
||||
this.headers,
|
||||
this.keywords,
|
||||
this.htmlEmailContent,
|
||||
this.emailContentPath
|
||||
this.emailContentPath,
|
||||
this.messageId,
|
||||
this.references,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -31,6 +35,8 @@ class DetailedEmail with EquatableMixin {
|
||||
headers,
|
||||
keywords,
|
||||
htmlEmailContent,
|
||||
emailContentPath
|
||||
emailContentPath,
|
||||
messageId,
|
||||
references,
|
||||
];
|
||||
}
|
||||
@@ -475,7 +475,9 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
attachments: success.attachments,
|
||||
headers: currentEmail?.emailHeader?.toSet(),
|
||||
keywords: currentEmail?.keywords,
|
||||
htmlEmailContent: success.htmlEmailContent
|
||||
htmlEmailContent: success.htmlEmailContent,
|
||||
messageId: success.emailCurrent?.messageId,
|
||||
references: success.emailCurrent?.references,
|
||||
);
|
||||
|
||||
_storeOpenedEmailAction(
|
||||
|
||||
@@ -29,6 +29,12 @@ class DetailedEmailHiveCache extends HiveObject with EquatableMixin {
|
||||
@HiveField(5)
|
||||
final Map<String, bool>? keywords;
|
||||
|
||||
@HiveField(6)
|
||||
final List<String>? messageId;
|
||||
|
||||
@HiveField(7)
|
||||
final List<String>? references;
|
||||
|
||||
DetailedEmailHiveCache({
|
||||
required this.emailId,
|
||||
required this.timeSaved,
|
||||
@@ -36,6 +42,8 @@ class DetailedEmailHiveCache extends HiveObject with EquatableMixin {
|
||||
this.emailContentPath,
|
||||
this.headers,
|
||||
this.keywords,
|
||||
this.messageId,
|
||||
this.references,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -46,5 +54,7 @@ class DetailedEmailHiveCache extends HiveObject with EquatableMixin {
|
||||
emailContentPath,
|
||||
headers,
|
||||
keywords,
|
||||
messageId,
|
||||
references,
|
||||
];
|
||||
}
|
||||
@@ -47,7 +47,6 @@ class ThreadConstants {
|
||||
EmailProperty.keywords,
|
||||
EmailProperty.mailboxIds,
|
||||
EmailProperty.messageId,
|
||||
EmailProperty.inReplyTo,
|
||||
EmailProperty.references,
|
||||
});
|
||||
|
||||
|
||||
@@ -20,6 +20,5 @@ class EmailProperty {
|
||||
static const String headers = 'headers';
|
||||
static const String headerMdnKey = 'Disposition-Notification-To';
|
||||
static const String messageId = 'messageId';
|
||||
static const String inReplyTo = 'inReplyTo';
|
||||
static const String references = 'references';
|
||||
}
|
||||
Reference in New Issue
Block a user