TF-79 Mark as star/unstar selected multiple email

This commit is contained in:
dab246
2021-09-20 14:29:02 +07:00
committed by Dat H. Pham
parent 1b061d4af9
commit c7a3e90a68
30 changed files with 565 additions and 98 deletions
@@ -1,5 +1,7 @@
import 'package:core/core.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
import 'package:jmap_dart_client/jmap/mail/email/keyword_identifier.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
import 'package:model/model.dart';
extension PresentationEmailExtension on PresentationEmail {
@@ -15,9 +17,11 @@ extension PresentationEmailExtension on PresentationEmail {
}
PresentationEmail toggleSelect() {
PresentationEmail toUpdatedPresentationEmail({Map<KeyWordIdentifier, bool>? newKeywords}) {
return PresentationEmail(
id,
keywords: keywords,
keywords: newKeywords ?? keywords,
size: size,
receivedAt: receivedAt,
hasAttachment: hasAttachment,
@@ -69,4 +73,22 @@ extension PresentationEmailExtension on PresentationEmail {
replyTo: replyTo
);
}
Email toEmail() {
return Email(
id,
keywords: keywords,
size: size,
receivedAt: receivedAt,
hasAttachment: hasAttachment,
preview: preview,
subject: subject,
sentAt: sentAt,
from: from,
to: to,
cc: cc,
bcc: bcc,
replyTo: replyTo
);
}
}