TF-1626 Remove id of email when call Email/set method

(cherry picked from commit ce1d27d893fd406aa812d4e4ea9debe1ec265ddb)
This commit is contained in:
dab246
2023-03-21 18:27:48 +07:00
committed by Dat Vu
parent 61a9414fe1
commit 0d77789c5f
19 changed files with 120 additions and 106 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ extension EmailExtension on Email {
Email updatedEmail({Map<KeyWordIdentifier, bool>? newKeywords, Map<MailboxId, bool>? newMailboxIds}) {
return Email(
id,
id: id,
keywords: newKeywords ?? keywords,
size: size,
receivedAt: receivedAt,
@@ -57,7 +57,7 @@ extension EmailExtension on Email {
PresentationEmail toPresentationEmail({SelectMode selectMode = SelectMode.INACTIVE}) {
return PresentationEmail(
id,
id: id,
keywords: keywords,
size: size,
receivedAt: receivedAt,
@@ -77,7 +77,7 @@ extension EmailExtension on Email {
Email combineEmail(Email newEmail, Properties updatedProperties) {
return Email(
newEmail.id,
id: newEmail.id,
keywords: updatedProperties.contain(EmailProperty.keywords) ? newEmail.keywords : keywords,
size: updatedProperties.contain(EmailProperty.size) ? newEmail.size : size,
receivedAt: updatedProperties.contain(EmailProperty.receivedAt) ? newEmail.receivedAt : receivedAt,